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