コード例 #1
0
        public bool ValidStates(Character character)
        {
            if (requiredStates != 0 && !character.IsOnAnyState((States)requiredStates))
            {
                return(false);
            }
            // TODO REVIEW this maybe a problem if Crounch has higher priority
            // but that's exacly why priority exists to rob the state to another action
            if (forbiddenStates != 0 && character.IsOnAnyState((States)forbiddenStates))
            {
                return(false);
            }

            return(true);
        }