예제 #1
0
        /************************************************************************************************************************/

        public override bool CanExitState(CreatureState nextState)
        {
            // Use the End Event time to determine when this state is alowed to exit.

            // We cannot simply have this method return false and set the End Event to call Creature.CheckMotionState
            // because it uses TrySetState (instead of ForceSetState) which would be prevented by returning false here.

            // And we cannot have this method return true because that would allow other actions like jumping in the
            // middle of an attack.

            return(_Attack.State.NormalizedTime >= _Attack.State.Events.NormalizedEndTime);
        }
예제 #2
0
        /************************************************************************************************************************/

        public override bool CanExitState(CreatureState nextState)
        {
            return(false);
        }
예제 #3
0
        /************************************************************************************************************************/

        public override bool CanEnterState(CreatureState previousState)
        {
            return(Creature.IsGrounded);
        }
예제 #4
0
        /************************************************************************************************************************/

        public override bool CanExitState(CreatureState nextState) => false;
예제 #5
0
        /************************************************************************************************************************/

        public override bool CanEnterState(CreatureState previousState)
        {
            return(Creature.CharacterController.isGrounded);
        }
예제 #6
0
        /************************************************************************************************************************/

        public override bool CanEnterState(CreatureState previousState) => Creature.IsGrounded;