/************************************************************************************************************************/

        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);
        }
        /************************************************************************************************************************/

        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;