mirror of
https://github.com/Yadciel1/2048-Shooter.git
synced 2024-11-12 17:11:18 +01:00
58 lines
1.3 KiB
Plaintext
58 lines
1.3 KiB
Plaintext
[gd_scene load_steps=4 format=2]
|
|
|
|
[ext_resource path="res://Font/super-legend-boy-font/SuperLegendBoy-4w8Y.ttf" type="DynamicFontData" id=1]
|
|
|
|
[sub_resource type="GDScript" id=1]
|
|
script/source = "extends Control
|
|
|
|
onready var pBar = $CanvasLayer/ProgressBar
|
|
|
|
signal full_bar
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready():
|
|
pass # Replace with function body.
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(delta):
|
|
if pBar.value == pBar.max_value:
|
|
var value = 5
|
|
emit_signal(\"full_bar\", value)
|
|
pBar.value = 0
|
|
pBar.max_value *= 1.2
|
|
pass
|
|
|
|
func on_Death_listed(value):
|
|
pBar.value += value
|
|
"
|
|
|
|
[sub_resource type="DynamicFont" id=2]
|
|
font_data = ExtResource( 1 )
|
|
|
|
[node name="Control" type="Control" groups=["XP"]]
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
margin_bottom = -1040.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
script = SubResource( 1 )
|
|
|
|
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
|
|
|
[node name="ProgressBar" type="ProgressBar" parent="CanvasLayer"]
|
|
anchor_left = 0.5
|
|
anchor_right = 0.5
|
|
margin_left = -144.0
|
|
margin_top = 48.0
|
|
margin_right = 48.0
|
|
margin_bottom = 62.0
|
|
rect_scale = Vector2( 1.5, 1.5 )
|
|
custom_fonts/font = SubResource( 2 )
|
|
max_value = 5.0
|
|
|
|
[node name="Label" type="Label" parent="."]
|
|
margin_right = 184.0
|
|
margin_bottom = 160.0
|