1
0
Fork 0
mirror of https://github.com/tonytins/dressupzack synced 2025-07-03 03:24:44 -04:00

Moved common functions to GameKit.gd

- GameKit.gd is meant to act as library. Right now it contains functions for simplfying game pausing and making it easier to switch between commonly used scenes. This should ONLY be used for scripts that inherent the base node type (i.e. Node).
- Screenshot was updated to remove the menu bar.
This commit is contained in:
Anthony Wilcox 2019-01-05 14:29:39 -05:00
parent e96a904041
commit 67dac38ded
7 changed files with 35 additions and 31 deletions

17
project/src/GameKit.gd Normal file
View file

@ -0,0 +1,17 @@
# Anthony Wilcox licenses this file to you under the GPL license.
# See the LICENSE file in the project root for more information.
extends Node
func is_game_paused(is_paused):
if is_paused == true:
get_tree().paused = true
else:
get_tree().paused = false
func switch_scenes(new_mode):
if new_mode == "classic":
get_tree().change_scene("res://ClassicScn.tscn")
elif new_mode == "modern":
get_tree().change_scene("res://ModernScn.tscn")
elif new_mode == "start":
get_tree().change_scene("res://StartScn.tscn")