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(); } }
public void Awake() { instance = this; }