Exemple #1
0
 // Start is called before the first frame update
 void Start()
 {
     gameMaster = GameObject.FindGameObjectWithTag("GM").GetComponent <GameMaster>();
     move       = GetComponent <MoveableObject>();
     live       = GetComponent <LiveThing>();
     anim       = GetComponent <Animator>();
     player     = gameMaster.GetPlayer();
 }
    void Start()
    {
        gameMaster = GameObject.FindGameObjectWithTag("GM").GetComponent <GameMaster>();
        move       = GetComponent <MoveableObject>();
        live       = GetComponent <LiveThing>();
        anim       = GetComponent <Animator>();
        player     = gameMaster.GetPlayer();

        healthbar.SetMaxHealth(live.health.initValue);
        healthbar.SetHealth(live.health.initValue);
    }