Пример #1
0
 public void Die()
 {
     isDead            = true;
     renderer.material = deathMaterial;
     AudioSource.PlayClipAtPoint(deathSound, transform.position);
     GreedManager.PersonKilled();
 }
Пример #2
0
 void OnTriggerEnter(Collider other)
 {
     if (other.tag == "food")
     {
         GreedManager.TakeFood();
         if (other.hingeJoint != null)
         {
             var needyPerson = other.hingeJoint.connectedBody.gameObject;
             Debug.Log(needyPerson.tag);
             if (needyPerson.tag != "crane")
             {
                 GameObject.Destroy(needyPerson);
             }
         }
         GameObject.Destroy(other.gameObject);
     }
 }
Пример #3
0
    void OnGUI()
    {
        GUILayout.Label(string.Format("Greed: {0}", GreedManager.TallyGreed()));

        GUILayout.Label(string.Format("Time Left: {0}", timer.TimeLeft.ToString("N1")));
    }