void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(instance); } else { Destroy(gameObject); } }
void Start() { ckm = GameObject.FindGameObjectWithTag("ckm").GetComponent <checkPointMana>(); }
private void Awake() { rgb = GetComponent <Rigidbody2D>(); ckm = GameObject.FindGameObjectWithTag("ckm").GetComponent <checkPointMana>(); transform.position = ckm.lastcheckpoint; }