Ejemplo n.º 1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
Ejemplo n.º 2
0
    void Start()
    {
        beat      = GameObject.FindWithTag("Player").GetComponent <BeatStrike>();
        lightTest = new Light[lightName.Length][];
        lightSet  = new GameObject[lightName.Length][];
        for (int i = 0; i < lightName.Length; i++)
        {
            lightSet[i]  = GameObject.FindGameObjectsWithTag(lightName[i]);
            lightTest[i] = new Light[lightSet[i].Length];
            for (int j = 0; j < lightSet[i].Length; j++)
            {
                lightTest[i][j] = lightSet[i][j].GetComponent <Light>();
            }
        }

        lightNumber = lightName.Length;
        count       = 0;
    }