예제 #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;
 }