Coin + Countdown Timer
Added a coin for player to pick up and a countdown timer
This commit is contained in:
47
World.tscn
47
World.tscn
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=12 format=2]
|
||||
[gd_scene load_steps=13 format=2]
|
||||
|
||||
[ext_resource path="res://Player.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://World.gd" type="Script" id=2]
|
||||
@@ -7,6 +7,7 @@
|
||||
[ext_resource path="res://Sprites/forestTreeBig.png" type="Texture" id=5]
|
||||
[ext_resource path="res://snowmen_enemy_blue.tscn" type="PackedScene" id=6]
|
||||
[ext_resource path="res://snowmen_enemy_blue.gd" type="Script" id=7]
|
||||
[ext_resource path="res://Countdown.gd" type="Script" id=8]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=1]
|
||||
radius = 9.0515
|
||||
@@ -163,3 +164,47 @@ position = Vector2( -49.6063, 34.526 )
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="YSort/wall3"]
|
||||
position = Vector2( 0, -4.25 )
|
||||
shape = SubResource( 4 )
|
||||
|
||||
[node name="coin_container" type="Control" parent="YSort"]
|
||||
margin_right = 40.0
|
||||
margin_bottom = 40.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Countdown" type="Control" parent="."]
|
||||
margin_right = 40.0
|
||||
margin_bottom = 40.0
|
||||
script = ExtResource( 8 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
minutes = 3
|
||||
|
||||
[node name="sec" type="RichTextLabel" parent="Countdown"]
|
||||
modulate = Color( 0.25098, 0.0431373, 0.411765, 1 )
|
||||
self_modulate = Color( 0.25098, 0.0431373, 0.411765, 1 )
|
||||
margin_left = 139.114
|
||||
margin_top = 5.0
|
||||
margin_right = 169.114
|
||||
margin_bottom = 26.0
|
||||
text = "00"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="dsec" type="RichTextLabel" parent="Countdown"]
|
||||
modulate = Color( 0.25098, 0.0431373, 0.411765, 1 )
|
||||
self_modulate = Color( 0.25098, 0.0431373, 0.411765, 1 )
|
||||
margin_left = 158.512
|
||||
margin_top = 4.7622
|
||||
margin_right = 198.512
|
||||
margin_bottom = 44.7622
|
||||
text = "0"
|
||||
|
||||
[node name="Timer" type="Timer" parent="Countdown"]
|
||||
process_mode = 0
|
||||
wait_time = 0.1
|
||||
autostart = true
|
||||
|
||||
[connection signal="timeout" from="Countdown/Timer" to="Countdown" method="_on_Timer_timeout"]
|
||||
|
Reference in New Issue
Block a user