GodotCourse/week6/updated_project/scripts/gameManager/gamemanager.gd
2024-10-07 19:20:42 -04:00

16 lines
387 B
GDScript

extends Node
var player: Resource
var coinsCollected:int = 0
# Called when the node enters the scene tree for the first time.
func _ready():
print("game manager ready")
player = load("res://scripts/resources/player_stats.tres")
func resetPlayer():
player.health = player.max_health
func playerDamage():
#replace this damage amount with value from data object
player.health -=20