void OnTriggerEnter(Collider col) { if (col.tag == "Player") { deathScript.KillPlayer(); } }
public override void Trigger(DeathScript death) { if (GameObject.FindWithTag("GameController").GetComponent <GlobalTimer>().danger) { death.KillPlayer(); } }
// Update is called once per frame void Update() { if (!hasTail) { FFLTimeLeft -= Time.deltaTime; FFLtext.text = FFLTimeLeft.ToString("00"); if (FFLTimeLeft < 0) { deathScript.KillPlayer(); if (ZombieWithTail != null) { ZombieWithTail.RemoveTail(); ZombieWithTail = null; } AddTail(); } } else { TimeSinceLastTheft += Time.deltaTime; if (TimeSinceLastTheft >= TheftCheckCoolDown) { GetCloseZombies(); CalculateTheft(); TimeSinceLastTheft = 0f; } } }
public override void Trigger(DeathScript death) { death.KillPlayer(); }