Пример #1
0
    void Start()
    {
        // Call the Spawn function after a delay of the spawnTime and then continue to call after the same amount of time.
        InvokeRepeating("Spawn", delay, delay);

        getElement = GetComponentInChildren <PortalSize>();
    }
Пример #2
0
    void Start()
    {
        gameController = GameObject.FindWithTag("GameController").GetComponent <MasterGameManager>();
        if (gameController == null)
        {
            Debug.Log("Reference to gameController could not be found in EnemyManager class");
        }

        // Call the Spawn function after a delay of the spawnTime and then continue to call after the same amount of time.
        InvokeRepeating("Spawn", delay, delay);
        getElement = GetComponentInChildren <PortalSize>();
    }