GodotCourse/week6/updated_project/scripts/gameManager/gamemanager.gd

17 lines
388 B
GDScript3
Raw Normal View History

2024-08-19 15:21:33 +00:00
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