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