nickmattinson / ZXYZ

Top-Down 2D Dungeon Crawler
1 stars 0 forks source link

Respawn #56

Closed nickmattinson closed 2 months ago

nickmattinson commented 2 months ago
nickmattinson commented 2 months ago

Possible solution [betting 4 tacos if works] we need to make a constructor for the Player class, assign all the default values to each attribute, including health = 1000, attack = 7, defense= 3, score = 0, username = PlayerPrefs.GetString("PlayerUserName), transform.position = respawnAnchorLocation, etc.

player.respawn() is a new method that we create to reset all these values back to their original values.