コード例 #1
0
ファイル: TouchArea.cs プロジェクト: Riku5A/MusicGame
 void OnTriggerStay(Collider col)
 {
     isonTrigger = true;
     Notes       = col.gameObject.transform.parent.gameObject;
     notesmove   = Notes.GetComponent <NotesMove>();
     if (col.tag == "PerfectTiming")
     {
         timing = "perfect";
     }
     else if (col.tag == "GreatTiming")
     {
         timing = "great";
     }
 }
コード例 #2
0
    void SpawnNotes(int num)
    {
        Instantiate(notes[num], new Vector3(0f, 2.5f, 5f), Quaternion.identity);
        notesmove = notes[num].GetComponent <NotesMove>();
        switch (swipeTipe[noteCounter])
        {
        case 0:
            notesmove.swipeMode = "touch";
            break;

        case 1:
            notesmove.swipeMode = "right";
            break;

        case 2:
            notesmove.swipeMode = "left";
            break;
        }
    }