Esempio n. 1
0
 void OnTriggerEnter(Collider col)
 {
     if (col.tag == "Player")
     {
         deathScript.KillPlayer();
     }
 }
Esempio n. 2
0
 public override void Trigger(DeathScript death)
 {
     if (GameObject.FindWithTag("GameController").GetComponent <GlobalTimer>().danger)
     {
         death.KillPlayer();
     }
 }
Esempio n. 3
0
    // 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();
 }