Пример #1
0
    private void FixedUpdate()
    {
        InputProcess();

        plms.setNaighborDistination();

        //version1.3
        {
            if (GameObject.FindWithTag("Spiral") == null && plms.curveFlg == false && plms.clearFlg == false)
            {
                if (ver > 0f && ver != oldVer && plms.lanePos[0] != Vector3.zero)        //上
                {
                    SpiralEulerAngles = new Vector3(0f, 0f, 0f);
                    spiralName        = "UpSpiral";
                    CorrectionSpiralAngles();
                    SpiralShot();
                    SEManager.Instance.Play(SEPath.MSFX_EXPLOSION_2_EXPLODE1);
                }
                else if (ver < 0f && ver != oldVer && plms.lanePos[3] != Vector3.zero)   //下
                {
                    SpiralEulerAngles = new Vector3(0f, 0f, 180f);
                    spiralName        = "DownSpiral";
                    CorrectionSpiralAngles();
                    SpiralShot();
                    SEManager.Instance.Play(SEPath.MSFX_EXPLOSION_2_EXPLODE1);
                }
                else if (hori < 0 && hori != oldHori && plms.lanePos[1] != Vector3.zero)   //左
                {
                    SpiralEulerAngles = new Vector3(0f, 0f, 90f);
                    spiralName        = "LeftSpiral";
                    CorrectionSpiralAngles();
                    SpiralShot();
                    SEManager.Instance.Play(SEPath.MSFX_EXPLOSION_2_EXPLODE1);
                }
                else if (hori > 0 && hori != oldHori && plms.lanePos[2] != Vector3.zero)   //右
                {
                    SpiralEulerAngles = new Vector3(0f, 0f, -90f);
                    spiralName        = "RightSpiral";
                    CorrectionSpiralAngles();
                    SpiralShot();
                    SEManager.Instance.Play(SEPath.MSFX_EXPLOSION_2_EXPLODE1);
                }
                //else if (cont_A == true)
                //{
                //    SpiralEulerAngles = new Vector3(90f, 0f, 0f);
                //    spiralName = "AccelSpiral";
                //    CorrectionSpiralAngles();
                //    SpiralShot();
                //}
            }

            if (Input.GetButton("Cont_A") || Input.GetMouseButton(0) && plms.curveFlg == false && plms.clearFlg == false)
            {
                //加速渦のSE
                //var currentSENames = SEManager.Instance.GetCurrentAudioNames();
                //if (!currentSENames.Contains("MSFX_CHRONO_GALE_WIND"))
                //{
                //    SEManager.Instance.Play(SEPath.MSFX_CHRONO_GALE_WIND);
                //}

                plms.accelCount = plms.accelTime;
                plms.RunSpeed   = plms.playerOriginSpeed * plms.accelForce;
                if (animeFlg)
                {
                    animator.SetTrigger("Spiral_UP");
                }
                animeFlg = false;
            }
            else
            {
                animeFlg = true;
            }
        }

        //version1.2
        {
            //if (GameObject.FindWithTag("Spiral") == null)
            //{

            //    //縦方向のうず移動
            //    if (ver > 0f && cont_A == true && plms.lanePos[0] != Vector3.zero)
            //    {
            //        x = 0f;
            //        y = 0f;
            //        z = 0f;
            //        SpiralEulerAngles = new Vector3(x, y, z);
            //        spiralName = "UpSpiral";
            //        SpiralShot();
            //    }
            //    else if (ver < 0f && cont_A == true && plms.lanePos[3] != Vector3.zero)
            //    {
            //        x = 0f;
            //        y = 0f;
            //        z = 0f;
            //        SpiralEulerAngles = new Vector3(x, y, z);
            //        spiralName = "DownSpiral";
            //        SpiralShot();
            //    }
            //    else if (hori < 0 && cont_A == true && plms.lanePos[1] != Vector3.zero)
            //    {
            //        x = 0f;
            //        y = 0f;
            //        z = -90f;
            //        SpiralEulerAngles = new Vector3(x, y, z);
            //        spiralName = "LeftSpiral";
            //        SpiralShot();
            //    }
            //    else if (hori > 0 && cont_A == true && plms.lanePos[2] != Vector3.zero)
            //    {
            //        x = 0f;
            //        y = 0f;
            //        z = 90f;
            //        SpiralEulerAngles = new Vector3(x, y, z);
            //        spiralName = "RightSpiral";
            //        SpiralShot();
            //    }
            //    else if (cont_A == true)
            //    {
            //        x = 90f;
            //        y = 0f;
            //        z = 0f;
            //        SpiralEulerAngles = new Vector3(x, y, z);
            //        spiralName = "AccelSpiral";
            //        SpiralShot();
            //    }

            //}
        }

        //version1.0
        {
            //if (GameObject.FindWithTag("Spiral") == null)
            //{

            //    if ((Input.GetKey(KeyCode.W) || Input.GetAxis("Vertical") == 1) &&
            //        (Input.GetMouseButtonDown(0) || Input.GetButton("Cont_A") == true)
            //        && plms.lanePos[0] != Vector3.zero)
            //    {
            //        x = 0f;
            //        y = 0f;
            //        z = 0f;
            //        SpiralEulerAngles = new Vector3(x, y, z);
            //        spiralName = "UpSpiral";
            //        SpiralShot();
            //    }
            //    else if ((Input.GetKey(KeyCode.A) || Input.GetAxis("Horizontal") == -1) &&
            //        (Input.GetMouseButtonDown(0) || Input.GetButton("Cont_A") == true) &&
            //        plms.lanePos[1] != Vector3.zero)
            //    {
            //        x = 0f;
            //        y = 0f;
            //        z = -90f;
            //        SpiralEulerAngles = new Vector3(x, y, z);
            //        spiralName = "LeftSpiral";
            //        SpiralShot();
            //    }
            //    else if ((Input.GetKey(KeyCode.D) || Input.GetAxis("Horizontal") == 1) &&
            //        (Input.GetMouseButtonDown(0) || Input.GetButton("Cont_A") == true) &&
            //        plms.lanePos[2] != Vector3.zero)
            //    {
            //        x = 0f;
            //        y = 0f;
            //        z = 90f;
            //        SpiralEulerAngles = new Vector3(x, y, z);
            //        spiralName = "RightSpiral";
            //        SpiralShot();
            //    }
            //    else if ( (Input.GetKey(KeyCode.S) || Input.GetAxis("Vertical") == -1) &&
            //              (Input.GetMouseButtonDown(0) || Input.GetButton("Cont_A") == true) &&
            //              plms.lanePos[3] != Vector3.zero)
            //    {
            //        x = 0f;
            //        y = 0f;
            //        z = 0f;
            //        SpiralEulerAngles = new Vector3(x, y, z);
            //        spiralName = "DownSpiral";
            //        SpiralShot();
            //    }
            //    else if (Input.GetButton("Cont_A") == true)
            //    {
            //        x = 90f;
            //        y = 0f;
            //        z = 0f;
            //        SpiralEulerAngles = new Vector3(x, y, z);
            //        spiralName = "AccelSpiral";
            //        SpiralShot();
            //    }

            //}
        }


        oldHori = hori;
        oldVer  = ver;
    }
Пример #2
0
    private void FixedUpdate()
    {
        InputProcess();

        plms.setNaighborDistination();

        if (pltu.tutoNum != 99 || pltu.skipTuto)
        {
            if (GameObject.FindWithTag("Spiral") == null && plms.curveFlg == false && plms.clearFlg == false)
            {
                if (ver > 0f && ver != oldVer && plms.lanePos[0] != Vector3.zero)        //上
                {
                    SpiralEulerAngles = new Vector3(0f, 0f, 0f);
                    spiralName        = "UpSpiral";
                    CorrectionSpiralAngles();
                    SpiralShot();
                    SEManager.Instance.Play(SEPath.MSFX_EXPLOSION_2_EXPLODE1);
                    pltu.tutoNum = 99;
                }
                else if (ver < 0f && ver != oldVer && plms.lanePos[3] != Vector3.zero)   //下
                {
                    SpiralEulerAngles = new Vector3(0f, 0f, 180f);
                    spiralName        = "DownSpiral";
                    CorrectionSpiralAngles();
                    SpiralShot();
                    SEManager.Instance.Play(SEPath.MSFX_EXPLOSION_2_EXPLODE1);
                    pltu.tutoNum = 99;
                }
                else if (hori < 0 && hori != oldHori && plms.lanePos[1] != Vector3.zero)   //左
                {
                    SpiralEulerAngles = new Vector3(0f, 0f, 90f);
                    spiralName        = "LeftSpiral";
                    CorrectionSpiralAngles();
                    SpiralShot();
                    SEManager.Instance.Play(SEPath.MSFX_EXPLOSION_2_EXPLODE1);
                    pltu.tutoNum = 99;
                }
                else if (hori > 0 && hori != oldHori && plms.lanePos[2] != Vector3.zero)   //右
                {
                    SpiralEulerAngles = new Vector3(0f, 0f, -90f);
                    spiralName        = "RightSpiral";
                    CorrectionSpiralAngles();
                    SpiralShot();
                    SEManager.Instance.Play(SEPath.MSFX_EXPLOSION_2_EXPLODE1);
                    pltu.tutoNum = 99;
                }
            }

            if (Input.GetButton("Cont_A") || Input.GetMouseButton(0) && plms.curveFlg == false && plms.clearFlg == false)
            {
                //加速渦のSE
                //var currentSENames = SEManager.Instance.GetCurrentAudioNames();
                //if (!currentSENames.Contains("MSFX_CHRONO_GALE_WIND"))
                //{
                //    SEManager.Instance.Play(SEPath.MSFX_CHRONO_GALE_WIND);
                //}

                plms.accelCount = plms.accelTime;
                plms.RunSpeed   = plms.playerOriginSpeed * plms.accelForce;
                pltu.tutoNum    = 99;
                if (animeFlg)
                {
                    animator.SetTrigger("Spiral_UP");
                }
                animeFlg = false;
            }
            else
            {
                animeFlg = true;
            }
        }

        oldHori = hori;
        oldVer  = ver;
    }