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