/// <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); }
/// <summary> /// 更新 /// </summary> void Update() { // 入力確認 if (SceneChanger.GetFadeFlg() || TouchUtil.GetTouch() != TouchInfo.Began) { return; } SceneChanger.SetScene("StageSelect"); SoundManager.Instance.PlaySE(5); this.enabled = false; }
/// <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; } }
/// <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; } }