-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathworld.tscn
111 lines (81 loc) · 3.7 KB
/
world.tscn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
[gd_scene load_steps=9 format=3 uid="uid://dacjdmw5p2jpi"]
[ext_resource type="Script" path="res://world.gd" id="1_0h435"]
[ext_resource type="PackedScene" uid="uid://d3878vqnvxs82" path="res://player/player.tscn" id="1_2f8yc"]
[ext_resource type="PackedScene" uid="uid://lybotj3vh6v7" path="res://enemy/skeleton.tscn" id="2_u36gk"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_1qawu"]
size = Vector2(1154, 171)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_8ese3"]
size = Vector2(37, 485.25)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_5gsot"]
size = Vector2(70, 102)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_tgynu"]
size = Vector2(131, 102)
[sub_resource type="GDScript" id="GDScript_5f6qr"]
script/source = "extends Label
# 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):
text = \"HP: \" + str(get_node(\"../../player/player\").health)
"
[node name="world" type="Node2D"]
script = ExtResource("1_0h435")
[node name="player" type="Node2D" parent="."]
[node name="player" parent="player" instance=ExtResource("1_2f8yc")]
top_level = true
position = Vector2(196, 295)
[node name="dash_again2" type="Timer" parent="player/player"]
wait_time = 0.6
[node name="dash_duration2" type="Timer" parent="player/player"]
wait_time = 0.2
[node name="enemies" type="Node2D" parent="."]
[node name="skeleton" parent="enemies" instance=ExtResource("2_u36gk")]
position = Vector2(847, 222)
[node name="StaticBody2D" type="StaticBody2D" parent="."]
[node name="floor" type="CollisionShape2D" parent="StaticBody2D"]
position = Vector2(575, 559.5)
shape = SubResource("RectangleShape2D_1qawu")
[node name="left wall" type="CollisionShape2D" parent="StaticBody2D"]
position = Vector2(-21, 237)
shape = SubResource("RectangleShape2D_8ese3")
[node name="right wall" type="CollisionShape2D" parent="StaticBody2D"]
position = Vector2(1175, 239)
shape = SubResource("RectangleShape2D_8ese3")
[node name="shop" type="CollisionShape2D" parent="StaticBody2D"]
position = Vector2(51, 419)
shape = SubResource("RectangleShape2D_5gsot")
[node name="shop label" type="Label" parent="StaticBody2D/shop"]
offset_left = -20.0
offset_top = -13.0
offset_right = 20.0
offset_bottom = 10.0
text = "shop"
[node name="shop (detection)" type="Area2D" parent="StaticBody2D/shop"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D/shop/shop (detection)"]
position = Vector2(-1.5, 0)
shape = SubResource("RectangleShape2D_tgynu")
[node name="shop panel" type="Panel" parent="StaticBody2D/shop/shop (detection)"]
offset_left = -35.0
offset_top = -51.0
offset_right = 35.0
offset_bottom = 52.0
mouse_default_cursor_shape = 2
[node name="Panel" type="Panel" parent="."]
offset_left = -6.0
offset_top = 471.0
offset_right = 1165.0
offset_bottom = 772.0
[node name="CanvasLayer (ui)" type="CanvasLayer" parent="."]
[node name="HP label" type="Label" parent="CanvasLayer (ui)"]
offset_left = 12.0
offset_top = 8.0
offset_right = 72.0
offset_bottom = 41.0
theme_override_font_sizes/font_size = 25
text = "HP"
script = SubResource("GDScript_5f6qr")
[connection signal="body_entered" from="StaticBody2D/shop/shop (detection)" to="." method="_on_shop_detection_body_entered"]
[connection signal="body_exited" from="StaticBody2D/shop/shop (detection)" to="." method="_on_shop_detection_body_exited"]
[connection signal="mouse_entered" from="StaticBody2D/shop/shop (detection)/shop panel" to="." method="_on_shop_panel_mouse_entered"]
[connection signal="mouse_exited" from="StaticBody2D/shop/shop (detection)/shop panel" to="." method="_on_shop_panel_mouse_exited"]