changes to coinHUD
This commit is contained in:
8
godot/hud/CoinHUD.gd
Normal file
8
godot/hud/CoinHUD.gd
Normal file
@@ -0,0 +1,8 @@
|
||||
extends CanvasLayer
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _physics_process(delta):
|
||||
if get_tree().paused:
|
||||
visible = false
|
||||
else:
|
||||
visible = true
|
58
godot/hud/CoinHUD.tscn
Normal file
58
godot/hud/CoinHUD.tscn
Normal file
@@ -0,0 +1,58 @@
|
||||
[gd_scene load_steps=8 format=2]
|
||||
|
||||
[ext_resource path="res://assets/coin.png" type="Texture" id=1]
|
||||
[ext_resource path="res://hud/coin/Counter.gdns" type="Script" id=2]
|
||||
[ext_resource path="res://hud/CoinHUD.gd" type="Script" id=3]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=1]
|
||||
bg_color = Color( 0, 0, 0, 0.541176 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 18, 18 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 18, 0, 18, 18 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=4]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 2 ), SubResource( 3 ) ],
|
||||
"loop": true,
|
||||
"name": "spin",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[node name="CoinHUD" type="CanvasLayer"]
|
||||
pause_mode = 2
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="Panel" type="Panel" parent="."]
|
||||
margin_left = 144.0
|
||||
margin_top = 18.0
|
||||
margin_right = 288.0
|
||||
margin_bottom = 54.0
|
||||
custom_styles/panel = SubResource( 1 )
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
margin_left = 180.0
|
||||
margin_top = 18.0
|
||||
margin_right = 220.0
|
||||
margin_bottom = 36.0
|
||||
text = "X"
|
||||
|
||||
[node name="Coins" type="Label" parent="."]
|
||||
margin_left = 198.0
|
||||
margin_top = 18.0
|
||||
margin_right = 238.0
|
||||
margin_bottom = 32.0
|
||||
text = "##"
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
position = Vector2( 162, 18 )
|
||||
frames = SubResource( 4 )
|
||||
animation = "spin"
|
||||
frame = 1
|
||||
playing = true
|
||||
centered = false
|
Reference in New Issue
Block a user