Ejemplo n.º 1
0
    public void FinishGame()
    {
        Player_behaviour pl = GameObject.Find("Player").GetComponent <Player_behaviour>();

        if (!pl.alive)
        {
            win = false;
        }


        finished = true;

        if (win)
        {
            Application.LoadLevel(win_scene);
        }
        else
        {
            Application.LoadLevel(lose_scene);
        }
    }
 // Use this for initialization
 void Start()
 {
     player_behaviour = GetComponentInParent <Player_behaviour>();
     animator         = GetComponent <Animator>();
 }
Ejemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     pl_behaviour = player.gameObject.GetComponent <Player_behaviour>();
     hp           = pl_behaviour.p_hp_max;
 }