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; } }
void Respawn() { rb.velocity = Vector3.zero; this.transform.position = build.GetPlayerSpawn(); //change this to moving to activated checkpoint position isDefeated = false; }