/// <summary> /// MUST BE CALLED FROM WITHIN m_movementLock! /// </summary> /// <param name="movement"></param> private void BeginTrackingFrames(MovementDescription movement) { if (m_currentMovement != null) { return; } m_currentMovement = movement; if (movement is AvatarFollower.AvatarFollowerDescription) { m_movementAction = new AvatarFollower(movement, this); } else if (movement is WanderingAction.WanderingDescription) { m_movementAction = new WanderingAction(movement, this); } else { m_movementAction = new NavigationPathAction(movement, this); } m_movementAction.Start(); m_movementAction.SetBeginningOfMovementFrame(); m_scene.EventManager.OnFrame += Scene_OnFrame; }
/// <summary> /// MUST BE CALLED FROM WITHIN m_movementLock! /// </summary> /// <param name="movement"></param> private void StopTrackingFrames() { if (m_currentMovement == null) { return; } m_movementAction.Stop(); m_movementAction = null; m_currentMovement = null; m_scene.EventManager.OnFrame -= Scene_OnFrame; }
public NavigationPathAction(MovementDescription desc, BotMovementController controller) : base(desc, controller) { m_description = (NavigationPathDescription)desc; }
public MovementAction(MovementDescription desc, BotMovementController controller) { m_baseDescription = desc; m_controller = controller; }
public AvatarFollower(MovementDescription desc, BotMovementController controller) : base(desc, controller) { m_description = (AvatarFollowerDescription)desc; }
public NavigationPathAction(MovementDescription desc, BotMovementController controller) : base(desc, controller) { m_description = (NavigationPathDescription)desc; }
public WanderingAction(MovementDescription desc, BotMovementController controller) : base(desc, controller) { m_description = (WanderingDescription)desc; }
public WanderingAction(MovementDescription desc, BotMovementController controller) : base(desc, controller) { m_description = (WanderingDescription)desc; }
public AvatarFollower(MovementDescription desc, BotMovementController controller) : base(desc, controller) { m_description = (AvatarFollowerDescription)desc; }
public MovementAction(MovementDescription desc, BotMovementController controller) { m_baseDescription = desc; m_controller = controller; }
/// <summary> /// MUST BE CALLED FROM WITHIN m_movementLock! /// </summary> /// <param name="movement"></param> private void StopTrackingFrames() { if (m_currentMovement == null) return; m_movementAction.Stop(); m_movementAction = null; m_currentMovement = null; m_scene.EventManager.OnFrame -= Scene_OnFrame; }
/// <summary> /// MUST BE CALLED FROM WITHIN m_movementLock! /// </summary> /// <param name="movement"></param> private void BeginTrackingFrames(MovementDescription movement) { if (m_currentMovement != null) return; m_currentMovement = movement; if (movement is AvatarFollower.AvatarFollowerDescription) m_movementAction = new AvatarFollower(movement, this); else if (movement is WanderingAction.WanderingDescription) m_movementAction = new WanderingAction(movement, this); else m_movementAction = new NavigationPathAction(movement, this); m_movementAction.Start(); m_movementAction.SetBeginningOfMovementFrame(); m_scene.EventManager.OnFrame += Scene_OnFrame; }