コード例 #1
0
ファイル: ButtonPit.cs プロジェクト: BoberUnity/Music-school
    void OnTriggerExit2D(Collider2D other2d)
    {
        SongPlace songPlace = other2d.GetComponent <SongPlace>();

        if (songPlace != null && other2d == currentSongPlaceCollider)
        {
            currentSongPlaceCollider = null;
        }
    }
コード例 #2
0
ファイル: ButtonPit.cs プロジェクト: BoberUnity/Music-school
    void OnTriggerEnter2D(Collider2D other2d)
    {
        SongPlace songPlace = other2d.GetComponent <SongPlace>();

        if (songPlace != null && songPlace.Pit == null)
        {
            currentSongPlaceCollider = other2d;
        }
    }