Instantly share code, notes, and snippets.

Embed
What would you like to do?
10.2 Create a game reset method
' Game class
' Method to Reset the game
Method ResetGame()
game_over_scene.SetActive(False)
game_over_scene.SetVisible(False)
play_scene.SetActive(True)
play_scene.SetAlpha(1.0)
Self.player.box.Remove()
CreatePlayer()
For Local enemy:Character = Eachin Self.enemies
enemy.box.Remove()
Self.enemies.RemoveFirst(enemy)
End
For Local projectile:Projectile = Eachin Self.projectiles
projectile.box.Remove()
Self.projectiles.RemoveFirst(projectile)
End
End
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment