Example #1
0
        /// <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;
        }
Example #2
0
        /// <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;
 }
Example #4
0
 public MovementAction(MovementDescription desc, BotMovementController controller)
 {
     m_baseDescription = desc;
     m_controller      = controller;
 }
Example #5
0
 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;
 }
Example #8
0
 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;
 }
Example #11
0
        /// <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;
        }
Example #12
0
        /// <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;
        }