Пример #1
0
    void EndAnimEvent()
    {
        SpawnMeteor meteorSpawner = FindObjectOfType <SpawnMeteor>();

        meteorSpawner.setFalse();

        this.gameObject.SetActive(false);
    }
Пример #2
0
    IEnumerator respawn()
    {
        yield return(new WaitForSeconds(respawnTime));

        lifeUi.setCurrentLifes(playerLifes);

        //Spawn player and position
        GameObject player = Instantiate(playerPrefab) as GameObject;

        playerPrefab.transform.position = new Vector2(screenBounds.x - 4, screenBounds.y - 1);

        ProgressBar progressbar = FindObjectOfType <ProgressBar>();

        progressbar.StartProgress();

        SpawnMeteor meteoriteSpawner = FindObjectOfType <SpawnMeteor>();

        meteoriteSpawner.setFalse();
    }