コード例 #1
0
    private void OnTriggerStay(Collider other)
    {
        //if (Input.touchCount == 1 &&
        //    Input.GetTouch(0).phase == TouchPhase.Began &&
        //    Input.GetTouch(0).position.x >= minX &&
        //    Input.GetTouch(0).position.x <= maxX &&
        //    Input.GetTouch(0).position.y <= maxY)
        //{
        //    checkJudgement(other);
        //    bmsLoader.destroyNote(other.gameObject);
        //}

        Debug.Log(line_num + " tcnt: " + Input.touchCount);
        for (int i = 0; i < Input.touchCount; i++)
        {
            if (Input.GetTouch(i).phase == TouchPhase.Began &&
                Input.GetTouch(i).position.x >= minX &&
                Input.GetTouch(i).position.x <= maxX &&
                Input.GetTouch(i).position.y <= maxY)
            {
                checkJudgement(other);
                bmsLoader.destroyNote(other.gameObject);
                break;
            }
        }


        //if (Input.GetKey(KeyboardKey))
        //{
        //    checkJudgement(other);
        //    bmsLoader.destroyNote(other.gameObject);
        //}
    }
コード例 #2
0
 private void OnTriggerStay(Collider other)
 {
     if (Input.GetKey(KeyboardKey))
     {
         checkJudgement(other);
         bmsLoader.destroyNote(other.gameObject);
     }
 }
コード例 #3
0
ファイル: JudgementMiss.cs プロジェクト: alflsowlrl/Catch_me
 private void OnTriggerEnter(Collider other)
 {
     bmsLoader.destroyNote(other.gameObject);
 }