// Use this for initialization void Start() { resurrectionTombstone = GetComponent <ResurrectionTombstone>(); StartCoroutine(Repeater()); enabled = false; }
public static void Active(ResurrectionTombstone tombstone) { for (int i = 0; i < tombstones.Count; i++) { if (tombstones[i] == tombstone) { tombstones[i].SetActive(); } else { tombstones[i].SetDeactive(); } } currentActiveTombstone = tombstone; activeTombstone.SetActive(false); }
private void AppearingBlackScreen() { if (blackScreen == null) { return; } blackScreen.color = Color.Lerp(blackScreen.color, Color.black, 2 * Time.deltaTime); if (Mathf.Abs(blackScreen.color.a - 1.0f) <= 0.0001f) { Destroy(img.gameObject); Destroy(txt.gameObject); ResurrectionTombstone.ResurrectPlayer(); waitingTime = Time.time + 1.5f; phase = DeathPhase.VanishingBlackScreen; } }