示例#1
0
    // Start is called before the first frame update
    void Start()
    {
        _scoreUI = GameObject.Find("Canvas").GetComponent <Score_Display_UI>();

        if (_scoreUI == null)
        {
            Debug.Log("Score Display is NULL");
        }
    }
示例#2
0
    void Start()
    {
        _player           = GameObject.Find("Player");
        _wavePanelManager = GameObject.Find("Wave_Panel").GetComponent <WavePanelManager>();
        _playerScore      = GameObject.Find("Player").GetComponent <PlayerScore>();
        _scoreDisplayUI   = GameObject.Find("Canvas").GetComponent <Score_Display_UI>();
        _playerHP         = GameObject.Find("Player").GetComponent <PlayerHealthAndDamage>();
        _bgColor          = GameObject.Find("Environment").GetComponent <BackgroundColorChange>();
        _canvasManager    = GameObject.Find("Canvas").GetComponent <CanvasManager>();

        if (_bgColor == null)
        {
            Debug.LogError("Cant find Background color change");
        }
        if (_playerHP == null)
        {
            Debug.LogError("Cant find Player Hp and Damage");
        }
        if (_player == null)
        {
            Debug.LogError("Cant find player for SpawnManager");
        }
        if (_wavePanelManager == null)
        {
            Debug.LogError("Cant find WavePanelManger ui component");
        }

        if (_scoreDisplayUI == null)
        {
            Debug.Log("Cant find the UI for SpawnManager");
        }

        if (spawnPoints.Length <= 0)
        {
            Debug.LogError("No SpawnPoints found");
        }

        waveCountdown = timeBetweenWaves;
    }
示例#3
0
    void Start()
    {
        _endPanel     = GameObject.Find("End_Panel");
        _playerScore  = GameObject.Find("Canvas").GetComponent <Score_Display_UI>();
        _spawnManager = GameObject.Find("SpawnManager").GetComponent <SpawnManager>();
        _finalScore   = GameObject.Find("Endpanel_Score_Text").GetComponent <Text>();
        _finalWave    = GameObject.Find("Wave_Number").GetComponent <Text>();

        if (_playerScore == null)
        {
            Debug.LogError("Cant find the HUD in EndPanel");
        }

        if (_endPanel == null)
        {
            Debug.Log("Missing end panel");
        }

        if (_spawnManager == null)
        {
            Debug.Log("Cant find spawn manager");
        }
    }