示例#1
0
        /// <summary>
        /// 入力座標を取得
        /// </summary>
        /// <returns>入力された座標</returns>
        public static Vector3 GetTouchPosition()
        {
            // エディター確認
            if (!CheckTouch())
            {
                TouchInfo touch = TouchUtil.GetTouch();
                if (touch != TouchInfo.None)
                {
                    return(Input.mousePosition);
                }
            }
            else
            {
                if (Input.touchCount > 0)
                {
                    Touch touch = Input.GetTouch(0);
                    TouchPosition.x = touch.position.x;
                    TouchPosition.y = touch.position.y;
                    return(TouchPosition);
                }
            }

            // 入力なし
            return(Vector3.zero);
        }
示例#2
0
        /// <summary>
        /// 更新
        /// </summary>
        void Update()
        {
            // 入力確認
            if (SceneChanger.GetFadeFlg() ||
                TouchUtil.GetTouch() != TouchInfo.Began)
            {
                return;
            }

            SceneChanger.SetScene("StageSelect");
            SoundManager.Instance.PlaySE(5);
            this.enabled = false;
        }
示例#3
0
        /// <summary>
        /// 更新
        /// </summary>
        void Update()
        {
            // 入力開始
            if (!SceneChanger.GetFadeFlg() && SceneChanger.GetStartFlg() &&
                TouchUtil.GetTouch() == TouchInfo.Began)
            {
                SceneChanger.SetScene("StageSelect");

                GameObject.Find("Player").GetComponent <TitlePlayer>().Change();
                GameObject.Find("Mini_Truck").GetComponent <ShakeTruck>().enabled = true;
                // エンジン
                SoundManager.Instance.PlaySE(1);

                //this.enabled = false;
            }
        }
示例#4
0
        /// <summary>
        /// 更新
        /// </summary>
        void Update()
        {
            m_fTime += Time.deltaTime;

            // タッチ入力確認
            if (!SceneChanger.GetFadeFlg() &&
                TouchUtil.GetTouch() == TouchInfo.Began)
            {
                m_fTime = m_fAppearTime;
            }

            // 表示時間を越える
            if (m_fTime >= m_fAppearTime)
            {
                SceneChanger.SetScene("Title");

                this.enabled = false;
            }
        }