コード例 #1
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(key) || Input.GetButtonDown(con.ToString()))
     {
         SceneManager.LoadScene(scene);
     }
 }
コード例 #2
0
    // Update is called once per frame
    void Update()
    {
        Spin();

        if ((Input.GetKeyDown(KeyCode.Space) || Input.GetButtonDown(AButton.ToString())))
        {
            this.enabled = false;
        }
    }
コード例 #3
0
    // Update is called once per frame
    void Update()
    {
        Transform myTransform = this.transform;

        if (Bubble2 != null)
        {
            OnBubble2 = true;
        }
        else
        {
            OnBubble2 = false;
        }
        if (Bubble3 != null)
        {
            OnBubble3 = true;
        }
        else
        {
            OnBubble3 = false;
        }

        Bub1Vec = Bubble.transform.position;
        if (OnBubble2 == true)
        {
            Bub2Vec = Bubble2.transform.position;
        }
        if (OnBubble3 == true)
        {
            Bub3Vec = Bubble3.transform.position;
        }

        if (OnBubble2 == false && OnBubble3 == false && num == 0)
        {
            Destroy(gameObject.transform.Find("GravityField").gameObject);
            num += 1;
        }

        //stopFlgを取得
        BubbleStopFlg = SpinOperation.GetstopFlg();

        //スペースを押したときの処理(1回きり)
        //Aボタンを押した
        if ((Input.GetKeyDown(KeyCode.Space) || Input.GetButtonDown(AButton.ToString())) && !floatflag)
        {
            floatflag = !floatflag;

            // ここで音を鳴らす
            SEManager.Instance.Play("SE/Bubble_Birth");

            taru.GetComponent <Animation>().Play("taru_open");
        }

        if (floatflag && taru != null && !taru.GetComponent <Animation>().isPlaying)
        {
            Destroy(taru.gameObject);
            taru = null;
        }

        if (BubbleStopFlg == true)
        {
            FloatAcceleration = StopAcceleration;
            // Debug.Log("StageStopNow");
        }
        else
        {
            FloatAcceleration = MoveAcceleration;
            //Debug.Log("StageMoveNow");
        }
    }
コード例 #4
0
    // 操作部分
    void SpinControl()
    {
        if (
#if (XBOX)
            (((int)LeftSpinX >= 10)

             && (Input.GetAxis(LeftSpinX.ToString()) > stickSense))

            || (((int)LeftSpinX >= 0 && (int)LeftSpinX < 10)

                && (Input.GetButton(LeftSpinX.ToString())))
#elif PS4
            (((int)LeftSpinX >= 14)

             && (Input.GetAxis(LeftSpinX.ToString()) > stickSense))

            || (((int)LeftSpinX >= 0 && (int)LeftSpinX < 14)

                && (Input.GetButton(LeftSpinX.ToString())))
#else
            (Input.GetKey(LeftSpin))
#endif

#if (DEBUG && (XBOX || PS4))
            || (Input.GetKey(LeftSpin)))
#else
            )
#endif

        {
            if (stopFlg)
            {
                stopFlg = false;
            }

            if (LRFlag)
            {
                if (SpinSpeed >= 0)
                {
                    SpinSpeed += SpinAcceleration * Time.deltaTime;

                    t        = 0.0f;
                    SlideFlg = false;
                }
                else
                {
                    SlideOpe();
                }
            }
            else
            {
                if (SpinSpeed <= 0)
                {
                    SpinSpeed -= SpinAcceleration * Time.deltaTime;

                    t        = 0.0f;
                    SlideFlg = false;
                }
                else
                {
                    SlideOpe();
                }
            }
        }