Esempio n. 1
0
 void Awake()
 {
     if (instanceMain == null)
     {
         instanceMain = this;
         DontDestroyOnLoad(instanceMain);
     }
     else
     {
         Destroy(gameObject);
     }
 }
Esempio n. 2
0
 void Start()
 {
     gm = GameObject.FindGameObjectWithTag("GMmain").GetComponent <GameMasterMain>();
     transform.position = gm.lastCheckPointPosMain;
     PlayerHealth playerHealth = die.GetComponent <PlayerHealth>();
 }
Esempio n. 3
0
 void Start()
 {
     gm     = GameObject.FindGameObjectWithTag("GM").GetComponent <GameMaster>();
     gmMain = GameObject.FindGameObjectWithTag("GMmain").GetComponent <GameMasterMain>();
 }