void OnTriggerEnter2D(Collider2D col) { Debug.Log("should destroy asteroid"); //if (col.gameObject.tag == "Asteroid") //{ // col.SendMessage("DestroyAsteroid"); //} if (col.gameObject.tag == "Astronaut") { isDead = true; loadScene.LoadByIndex(2); } }
private void Update() { if (OxygenHitPoint <= 0) { player.isDead = true; loadScene.LoadByIndex(2); } UseOxygen(); if (Input.GetKey(KeyCode.Space)) { UseFuel(); } }