added battle state as globals, adds half working battle flow

This commit is contained in:
Luca 2024-09-29 16:18:32 +02:00
parent b09eee0805
commit 4963131d3e
12 changed files with 250 additions and 95 deletions

View file

@ -2,11 +2,11 @@ extends Node
var player: Node3D = null
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
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"
@ -16,9 +16,3 @@ func load_base_monster_data(p_unique_id) -> MonsterData:
else:
printerr("Monster.gd: No monster with the ID %s found" % p_unique_id)
return null
func set_player(p_player) -> void:
player = p_player
func get_player() -> Node3D:
return player