Esempio n. 1
0
    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);
        }
    }
Esempio n. 2
0
    private void Update()
    {
        if (OxygenHitPoint <= 0)
        {
            player.isDead = true;
            loadScene.LoadByIndex(2);
        }

        UseOxygen();

        if (Input.GetKey(KeyCode.Space))
        {
            UseFuel();
        }
    }