示例#1
0
 public override void OnStateEnter(MyMovementState previousState)
 {
     _currentChargeVelocity  = KinematicCharacterMotor.CharacterTransform.forward * ChargeSpeed;
     _isStopped              = false;
     _timeSinceStartedCharge = 0f;
     _timeSinceStopped       = 0f;
 }
示例#2
0
        /// <summary>
        /// Handles movement state transitions and enter/exit callbacks
        /// </summary>
        public void TransitionToState(MyMovementState newState)
        {
            newState.AssignedCharacterController = this;
            newState.KinematicCharacterMotor     = this.KinematicCharacterMotor;

            if (CurrentMovementState != null)
            {
                CurrentMovementState.OnStateExit(newState);
            }

            MyMovementState prevState = CurrentMovementState;

            CurrentMovementState = newState;
            CurrentMovementState.OnStateEnter(prevState);
        }
 public override void OnStateEnter(MyMovementState previousState)
 {
 }
 public override void OnStateExit(MyMovementState nextState)
 {
 }
示例#5
0
 public abstract void OnStateEnter(MyMovementState previousState);
示例#6
0
 public abstract void OnStateExit(MyMovementState nextState);