コード例 #1
0
        private bool CheckEventInputRequirement(CAF.Combat.AttackEventDefinition currentEvent)
        {
            if (StateManager.CurrentStateFrame != currentEvent.endFrame)
            {
                return(false);
            }

            switch (currentEvent.inputCheckTiming)
            {
            case AttackEventInputCheckTiming.ONCE:
                for (int i = (int)currentEvent.startFrame; i < currentEvent.endFrame; i++)
                {
                    if (CombatManager.CheckForInputSequence(currentEvent.input))
                    {
                        return(true);
                    }
                }
                break;

            case AttackEventInputCheckTiming.CONTINUOUS:
                for (int i = (int)currentEvent.startFrame; i < currentEvent.endFrame; i++)
                {
                    if (!CombatManager.CheckForInputSequence(currentEvent.input, i, true, true))
                    {
                        return(false);
                    }
                }
                return(true);

                break;
            }
            return(false);
        }