コード例 #1
0
        /// <summary>
        /// コンボ攻撃などを制御
        /// </summary>
        public PlayerAttackFlow(Animator animator)
        {
            this.animator = animator;
            groundRootMotion = new Motion();
            Motion attack1 = new Motion("GroundAttack1", 1.3f, 1, InputName.Attack, 0.5f);
            Motion attack2 = new Motion("GroundAttack2", 1.3f, 2, InputName.Attack, 0.5f);
            Motion attack3 = new Motion("GroundAttack3", 1.3f, 3, InputName.Attack, 0.5f);
            // コンボ攻撃を追加
            groundRootMotion.AddNextMotion(attack1);
            attack1.AddNextMotion(attack2);
            attack2.AddNextMotion(attack3);

            airRootMotion = new Motion();
            attack1 = new Motion("AirAttack1", 1.3f, 1, InputName.Attack, 0.5f);
            attack2 = new Motion("AirAttack2", 1.3f, 2, InputName.Attack, 0.5f);
            attack3 = new Motion("AirAttack3", 1.3f, 3, InputName.Attack, 0.5f);

            // コンボ攻撃を追加
            airRootMotion.AddNextMotion(attack1);
            attack1.AddNextMotion(attack2);
            attack2.AddNextMotion(attack3);

            currentMotion = groundRootMotion;
        }