proto3 initial commit

This commit is contained in:
Segey Lapin
2020-04-13 12:45:25 +03:00
parent 69410badf6
commit 1084b6d5c3
1588 changed files with 368852 additions and 23 deletions

22
proto3/godot/ui/bars.gd Normal file
View File

@@ -0,0 +1,22 @@
extends VBoxContainer
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func _process(_delta):
if !global.player:
return
var h = global.player.get_meta("health")
var maxh = global.player.get_meta("max_health")
var s = global.player.get_meta("stamina")
var maxs = global.player.get_meta("max_stamina")
$health.value = 100.0 * (1 + h) / (1 + maxh)
$stamina.value = 100.0 * (1 + s) / (1 + maxs)