// Start is called before the first frame update
 void Start()
 {
     if (instance != null)
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
     }
     heathbar.SetMaxHealth(maxPlayerHealth);
 }
Esempio n. 2
0
 // Start is called before the first frame update
 void Start()
 {
     Player   = GameObject.FindGameObjectWithTag("Player").transform;
     Target   = new Vector2(Player.position.x, Player.position.y);
     instance = GameObject.FindGameObjectWithTag("GPC").GetComponent <GamePlayeController>();
 }