예제 #1
0
 private void Update()
 {
     if (MultiTouch.GetTouch() == TouchInfo.Began)//ワンクリックまたはタッチした場合
     {
         SceneManager.LoadScene("Main");
     }
 }
예제 #2
0
        private void MoveBom()
        {
            switch (MultiTouch.GetTouch())
            {
            case TouchInfo.Moved:
            {
                Vector2 position = MultiTouch.GetTouchWorldPosition(Camera.main);
                _bomObj.transform.position = position;
            }
            break;

            case TouchInfo.Ended:
            {
                Flag = false;
                Debug.Log("PutBom");
                Vector2 position    = MultiTouch.GetTouchWorldPosition(Camera.main);
                var     collition2D = Physics2D.OverlapPoint(position + new Vector2(-0.8F, 0));

                if (collition2D)
                {        //ここで爆破判定
                    boomManager.StartBoom();
                    Destroy(_bomObj);
                }
                else
                {
                    Destroy(_bomObj);
                    Debug.Log("BomFaled");
                    gameManager.BomFlag = false;
                }
            }
            break;
            }
        }