added stamina and health bar, gold can now be picked up

This commit is contained in:
2025-06-25 21:07:48 -05:00
parent 3e506590a9
commit 60432795f2
9 changed files with 99 additions and 46 deletions

View File

@@ -3,15 +3,13 @@ extends Node3D
const GOLDCOIN = preload("res://Prefabs/goldcoin.tscn")
const MAX_AV = 15
func _on_timer_timeout() -> void:
var instance_coin = GOLDCOIN.instantiate()
var av_x = randf_range(-10,10)
var av_y = randf_range(-10,10)
var av_z = randf_range(-10,10)
instance_coin.global_basis = global_basis
var av_x = randf_range(-MAX_AV,MAX_AV)
var av_y = randf_range(-MAX_AV,MAX_AV)
var av_z = randf_range(-MAX_AV,MAX_AV)
get_tree().current_scene.add_child(instance_coin)
instance_coin.global_position = global_position
instance_coin.angular_velocity = Vector3(av_x,av_y,av_z)
get_tree().current_scene.add_child(instance_coin)