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