Beispiel #1
0
        /************************************************************************************************************************/

        public override bool CanEnterState(CreatureState previousState) => Creature.GroundDetector.IsGrounded;
Beispiel #2
0
        /************************************************************************************************************************/

        /// <summary>
        /// Returns false so that nothing can interript an attack until it is done.
        /// </summary>
        /// <remarks>
        /// If we had a Flinch state that gets triggered when the creature gets hit by an enemy, we would probably want
        /// it to be able to interrupt an attack. To do this, we could use an int or an enum like in the
        /// <see cref="CreatureState.Priority"/> example.
        /// <para></para>
        /// We could just enter the Flinch state using <see cref="FSM.StateMachine{TState}.ForceSetState(TState)"/>,
        /// but then we would never be able to prevent it from triggering. For example, interacting with an object or
        /// doing something in a cutscene might use a state that should never be interrupted.
        /// </remarks>
        public override bool CanExitState(CreatureState nextState)
        {
            return(false);
        }
Beispiel #3
0
        /************************************************************************************************************************/

        /// <summary>
        /// Returns false so that nothing can interript an attack until it is done.
        /// </summary>
        /// <remarks>
        /// If we had a Flinch state that gets triggered when the creature gets hit by an enemy, we would probably want
        /// it to be able to interrupt an attack. To do this, we could use an int or an enum like in the
        /// <see cref="CreatureState.Priority"/> example.
        /// <para></para>
        /// We could just enter the Flinch state using <see cref="FSM.StateMachine{TState}.ForceSetState(TState)"/>,
        /// but then we would never be able to prevent it from triggering. For example, interacting with an object or
        /// doing something in a cutscene might use a state that should never be interrupted.
        /// </remarks>
        public override bool CanExitState(CreatureState nextState) => false;