示例#1
0
    void Start()
    {
        wavesManager = WavesManager.Instance;

        startWaveButtons = new List <StartWaveButton>();

        for (int i = 0; i < ownTransform.childCount; i++)
        {
            Transform       child           = ownTransform.GetChild(i);
            StartWaveButton startWaveButton = child.GetComponent <StartWaveButton>();
            if (startWaveButton != null)
            {
                startWaveButtons.Add(startWaveButton);
            }
        }
    }
 private void FindObjects()
 {
     gameTimerController = FindObjectOfType <GameTimerController>();
     startWaveButton     = FindObjectOfType <StartWaveButton>();
     audioController     = FindObjectOfType <AudioController>();
 }