Changed the way the fades work, and brought back in the Player

This commit is contained in:
2024-01-22 17:00:30 -08:00
parent 630670d5b1
commit bde3cc5976
14 changed files with 626 additions and 36 deletions
+30
View File
@@ -0,0 +1,30 @@
extends Node
var game_name: String = "pDash"
var game_version: float = 0.1
## Resources
var lvl_paths: Array[String] = [
"res://scenes/levels/level_0.tscn",
"res://scenes/levels/level_1.tscn"
]
## Variables
const STARTING_LIVES: int = 3
## Preferences
var show_splash: bool = false
func fade( type: String , t: float ):
var fade = load("res://scenes/ui/fade.tscn").instantiate();
if type == "in":
fade.type = 0
elif type == "out":
fade.type = 1
fade.speed = 1/t
get_node("/root/Main/Curtains").add_child( fade )
func splash():
var splash = load("res://scenes/ui/Splash.tscn").instantiate();
get_node("/root/Main/Splash").add_child( splash )
await splash.get_node("AnimationPlayer").animation_finished