added first theme progress and switched all files to use static typing
This commit is contained in:
parent
c9458f3627
commit
b5ace17da9
2665 changed files with 50249 additions and 476 deletions
5
globals/MusicFile.gd
Normal file
5
globals/MusicFile.gd
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
extends Resource
|
||||
class_name MusicFile
|
||||
|
||||
@export var file: AudioStream
|
||||
@export var name: String
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
extends Node
|
||||
|
||||
@export var music: Array
|
||||
|
||||
func play():
|
||||
pass
|
||||
|
||||
func stop_all():
|
||||
pass
|
||||
|
||||
func fade_out():
|
||||
pass
|
||||
|
||||
func fade_in():
|
||||
pass
|
||||
|
||||
func battle():
|
||||
pass
|
||||
10
globals/background_music_manager.gd
Normal file
10
globals/background_music_manager.gd
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
extends Node
|
||||
|
||||
@export var music: Array[MusicFile]
|
||||
|
||||
func play(_file: String) -> void:
|
||||
pass
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
12
globals/background_music_manager.tscn
Normal file
12
globals/background_music_manager.tscn
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://boxny6sh3y05y"]
|
||||
|
||||
[ext_resource type="Script" path="res://globals/background_music_manager.gd" id="1_ngng4"]
|
||||
[ext_resource type="Script" path="res://globals/MusicFile.gd" id="2_d24t4"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_rphwp"]
|
||||
script = ExtResource("2_d24t4")
|
||||
name = ""
|
||||
|
||||
[node name="BackgroundMusicManager" type="Node"]
|
||||
script = ExtResource("1_ngng4")
|
||||
music = Array[ExtResource("2_d24t4")]([SubResource("Resource_rphwp")])
|
||||
12
globals/colors.gd
Normal file
12
globals/colors.gd
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
extends Node
|
||||
|
||||
# Documentation for Export Variables:
|
||||
# https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_exports.html
|
||||
|
||||
@export_category("UI Colors")
|
||||
@export var text_color: Color = Color("4d4d4d")
|
||||
@export var text_color_pressed: Color = Color("4d4d4d")
|
||||
@export var text_color_disabled: Color = Color("b3b3b3c8")
|
||||
|
||||
@export var default_text_size: int = 20
|
||||
@export var main_menu_text_size: int = 30
|
||||
6
globals/colors.tscn
Normal file
6
globals/colors.tscn
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://2trnlyv20e6w"]
|
||||
|
||||
[ext_resource type="Script" path="res://globals/colors.gd" id="1_toe0q"]
|
||||
|
||||
[node name="Colors" type="Node"]
|
||||
script = ExtResource("1_toe0q")
|
||||
|
|
@ -1,25 +1,25 @@
|
|||
extends Node
|
||||
|
||||
@onready var scene_root = $/root/Game/CurrentScene
|
||||
@onready var scene_root: Node3D = $/root/Game/CurrentScene
|
||||
var current_world : Node = null
|
||||
|
||||
func get_world() -> String:
|
||||
return current_world.scene_file_path
|
||||
|
||||
func set_world(path: String):
|
||||
func set_world(path: String) -> void:
|
||||
if ResourceLoader.exists(path):
|
||||
var world = load(path).instantiate()
|
||||
var world: Node = load(path).instantiate()
|
||||
scene_root.add_child(world)
|
||||
current_world = world
|
||||
else:
|
||||
printerr("Level %s does not exist" % path)
|
||||
|
||||
func remove_world():
|
||||
var world = scene_root.get_child(0)
|
||||
func remove_world() -> void:
|
||||
var world: Node3D = scene_root.get_child(0)
|
||||
if world == null:
|
||||
printerr("No world node found")
|
||||
return
|
||||
|
||||
|
||||
scene_root.remove_child(world)
|
||||
world.queue_free()
|
||||
current_world = null
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@ var player: Node3D = null
|
|||
|
||||
func set_player(p_player: Node3D) -> void:
|
||||
player = p_player
|
||||
|
||||
|
||||
func get_player() -> Node3D:
|
||||
return player
|
||||
|
||||
func load_base_monster_data(p_unique_id) -> MonsterData:
|
||||
var path = "res://resources/monsters/" + p_unique_id + ".tres"
|
||||
func load_base_monster_data(p_unique_id: String) -> MonsterData:
|
||||
var path: String = "res://resources/monsters/" + p_unique_id + ".tres"
|
||||
if ResourceLoader.exists(path):
|
||||
var base_monster = load(path)
|
||||
var base_monster: MonsterData = load(path)
|
||||
return base_monster
|
||||
else:
|
||||
printerr("Monster.gd: No monster with the ID %s found" % p_unique_id)
|
||||
Loading…
Add table
Add a link
Reference in a new issue