Exemple #1
0
 void Update()
 {
     thisPosition.x = transform.position.x;
     thisPosition.y = transform.position.y;
     if (thisPosition != build.GetPlayerSpawn())
     {
         build.SetPlayerSpawn(thisPosition);
     }
     //hide any collisions/graphics
     if (!gc.GetIsBuilding())
     {
         sprite.enabled = false;
         col.enabled    = false;
     }
     else if (gc.GetIsBuilding())
     {
         sprite.enabled = true;
         col.enabled    = true;
     }
 }
Exemple #2
0
 void Respawn()
 {
     rb.velocity             = Vector3.zero;
     this.transform.position = build.GetPlayerSpawn();         //change this to moving to activated checkpoint position
     isDefeated = false;
 }