Пример #1
0
        void OnCollisionEnter(Collision collision)
        {
            if (!unitInfo.alive)
            {
                return;
            }

            if (collision.gameObject.tag == "GROUND")
            {
                //death
                unitInfo.alive      = false;
                unitInfo.finalScore = time;

                //Debug.Log("Unit " + gameObject.name + "died" + "\nscore: " + unitInfo.finalScore);

                GameG.DecreaseAliveCount();
            }
        }
Пример #2
0
 public void Awake()
 {
     instance = this;
 }