コード例 #1
0
        public override void Run(Combat.Character character)
        {
            Int32?  statenumber     = EvaluationHelper.AsInt32(character, StateNumber, null);
            Boolean?playercontrol   = EvaluationHelper.AsBoolean(character, Control, null);
            Int32?  animationnumber = EvaluationHelper.AsInt32(character, AnimationNumber, null);

            if (statenumber == null)
            {
                return;
            }
            character.StateManager.ChangeState(statenumber.Value);

            if (playercontrol != null)
            {
                if (playercontrol == true)
                {
                    character.PlayerControl = PlayerControl.InControl;
                }
                if (playercontrol == false)
                {
                    character.PlayerControl = PlayerControl.NoControl;
                }
            }

            if (animationnumber != null)
            {
                character.SetLocalAnimation(animationnumber.Value, 0);
            }
        }
コード例 #2
0
ファイル: ChangeAnim.cs プロジェクト: terrynoya/xnamugen-1
        public override void Run(Combat.Character character)
        {
            var animationnumber = EvaluationHelper.AsInt32(character, AnimationNumber, null);
            var elementnumber   = EvaluationHelper.AsInt32(character, ElementNumber, 0);

            if (animationnumber == null)
            {
                return;
            }

            --elementnumber;
            if (elementnumber < 0)
            {
                elementnumber = 0;
            }

            character.SetLocalAnimation(animationnumber.Value, elementnumber);
        }