Exemple #1
0
    private IEnumerator ResetHealthAndPosition()
    {
        yield return(new WaitForSecondsRealtime(1.5f));

        if (destroyQueued)
        {
            Destroy(gameObject);
            yield return(null);
        }

        attackerNr = 0;
        health     = maxHealth;
        OnHealthChange(false);
        transform.position = spawnPoint;
        playerUI.ActivateHealthBars(playerNumber - 1);
        destroyPlanet.transform.position = transform.position;
        destroyPlanet.transform.parent   = transform;

        planetChild.SetActive(true);
        weaponOrbit.SetActive(true);
    }