예제 #1
0
    void ZombieButton()
    {
        switch (m_job)
        {
        case PlayerJob.GeroZomie:
            if (m_playerInput.button_A && !m_jump)
            {
                m_rigid2D.AddForce(Vector2.up * m_flap);
                m_playerAnimations.JumpAnimation();
                m_jump = true;
            }

            if (m_playerInput.button_B)
            {
                if (m_ShotSoul)
                {
                    Instantiate(m_Soul, transform.position, transform.rotation);
                }
                m_ShotSoul = false;
            }

            if (m_playerInput.button_X)
            {
                m_playerAnimations.GeroAnimation();
                this.gameObject.GetComponent <ZombieController>().AttackCoal1();
            }

            if (m_playerInput.button_Y)
            {
                m_playerAnimations.AtteckAnimation();
            }
            break;

        case PlayerJob.Dogzombie:
            if (m_playerInput.button_A && !m_jump)
            {
                m_rigid2D.AddForce(Vector2.up * m_flap);
                m_playerAnimations.JumpAnimation();
                m_jump = true;
            }
            if (m_playerInput.button_B)
            {
                if (m_ShotSoul)
                {
                    Instantiate(m_Soul, transform.position, transform.rotation);
                }
                m_ShotSoul = false;
            }

            if (m_playerInput.button_X)
            {
                //this.gameObject.GetComponent<ZombieController>().AttackCoal1();
            }

            if (m_playerInput.button_Y)
            {
                //m_playerAnimations.AtteckAnimation();
            }
            break;

        case PlayerJob.PowerZombie:
            if (m_playerInput.button_A && !m_jump)
            {
                /*
                 * m_rigid2D.AddForce(Vector2.up * m_flap);
                 * m_playerAnimations.JumpAnimation();
                 * m_jump = true;
                 */
            }
            if (m_playerInput.button_B)
            {
                if (m_ShotSoul)
                {
                    Instantiate(m_Soul, transform.position, transform.rotation);
                }
                m_ShotSoul = false;
            }

            if (m_playerInput.button_X)
            {
                Debug.Log("tak");
                m_playerAnimations.TackleAnimation();
                this.gameObject.GetComponent <ZombieController>().AttackCoal1();
            }

            if (m_playerInput.button_Y)
            {
                m_playerAnimations.AtteckAnimation();
            }
            break;

        case PlayerJob.BirdZombie:
            if (m_playerInput.button_A && !m_jump)
            {
                m_rigid2D.AddForce(Vector2.up * m_flap);
                m_playerAnimations.JumpAnimation();
                m_jump = true;
            }
            if (m_playerInput.button_B)
            {
                Debug.Log("a");
                if (m_ShotSoul)
                {
                    Instantiate(m_Soul, transform.position, transform.rotation);
                }
                m_ShotSoul = false;
            }

            if (m_playerInput.button_X)
            {
                m_rigid2D.AddForce(Vector2.up * 10f);
                m_playerAnimations.FlyAnimation();
            }

            if (m_playerInput.button_Y)
            {
                m_playerAnimations.AtteckAnimation();
            }
            break;

        default:
            break;
        }
    }
예제 #2
0
    void Attack1()
    {
        switch (Type)
        {
        case ZombieType.GeroZombie:
            if (LaterChance_count == 60)
            {
                m_playerAnimations.GeroAnimation(); m_playerAnimations.GeroAnimation();
            }
            else if (LaterChance_count == 50)
            {
                if (Hijack_Frag)
                {
                    Instantiate(GeroZomie_R_Gero, transform.position, Quaternion.identity);
                }
                else
                {
                    Instantiate(GeroZomie_L_Gero, transform.position, Quaternion.identity);
                }
            }
            break;

        case ZombieType.DogZombie:
            if (LaterChance_count == 180)
            {
                Parameter_Speed = 0;
                Debug.Log("aruki");
                //m_playerAnimations.MoveAnimation(1.0f); m_playerAnimations.MoveAnimation(1.0f);
                m_animatorManeger.MoveSpeed = 0.5f;
            }
            else if (LaterChance_count == 1)
            {
                Parameter_Speed = 1;
            }
            else if (LaterChance_count <= 171)
            {
                if (Parameter_Speed <= Parameter_DashSpeed * 1.5f)
                {
                    Parameter_Speed += 0.05f;
                }
                transform.Translate(new Vector2(Parameter_Speed * 0.05f, rb.velocity.y));     //移動
            }
            break;

        case ZombieType.PowerZombie:
            if (LaterChance_count == 120)
            {
                Parameter_Speed = 0;
                m_playerAnimations.TackleAnimation();
            }
            else if (LaterChance_count <= 11)
            {
                Parameter_Speed = 0.5f;
            }
            else if (LaterChance_count <= 111)
            {
                if (Parameter_Speed <= Parameter_DashSpeed)
                {
                    Parameter_Speed += 0.1f;
                }
                transform.Translate(new Vector2(Parameter_Speed * 0.05f, rb.velocity.y));     //移動
                m_playerAnimations.TackleAnimation();
            }
            break;

        case ZombieType.BirdZombie:
            if (LaterChance_count == 291)
            {
                rb.AddForce(Vector2.up * 400.0f);
                m_playerAnimations.FlyAnimation();
            }
            if (LaterChance_count == 271)
            {
                m_playerAnimations.FlyAnimation();
            }
            if (LaterChance_count == 251)
            {
                m_playerAnimations.FlyAnimation();
            }
            else if (LaterChance_count == 180)
            {
                rb.AddForce(Vector2.left * 250.0f);
                rb.AddForce(Vector2.down * 100.0f);
            }
            break;
        }   //攻撃1のタイムテーブル設定
        //Debug.Log("Attack1:"+ LaterChance_count);
    }