Created
January 2, 2017 23:47
-
-
Save codetravis/003b852ff7983508a3dd44f26d0b08e4 to your computer and use it in GitHub Desktop.
10.2 Create a game reset method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' 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