-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNode2D.tscn
92 lines (73 loc) · 6.23 KB
/
Node2D.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
[gd_scene load_steps=10 format=3 uid="uid://c1u0d7wbte2qx"]
[ext_resource type="TileSet" uid="uid://chch7qij7mj4j" path="res://summertileset.tres" id="1_6vgqx"]
[ext_resource type="Script" path="res://Node2D.gd" id="1_y7fem"]
[ext_resource type="PackedScene" uid="uid://ke36y4hnpwk2" path="res://player.tscn" id="4_rkwjr"]
[ext_resource type="PackedScene" uid="uid://bsy4xbbfek3j2" path="res://enemy.tscn" id="5_2pm0o"]
[ext_resource type="Texture2D" uid="uid://c1c3vfbdx6mch" path="res://прилавок.png" id="6_ja1s2"]
[ext_resource type="PackedScene" uid="uid://bp82bt55e1vtw" path="res://shop.tscn" id="7_jxqxq"]
[ext_resource type="PackedScene" uid="uid://dlj3bqoocs802" path="res://panel.tscn" id="7_kuy7f"]
[sub_resource type="GDScript" id="GDScript_2laos"]
script/source = "extends Area2D
var currentItem = 0
# 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):
pass
func _on_body_entered(body):
if body.name == \"player\":
get_tree().paused = true
get_node(\"../player/AnimatedSprite2D\").play(\"idle\")
get_node(\"shop/Anim\").play(\"TransIn\")
get_node(\"shop/Control/AnimSprite\").play(Global.items[currentItem][\"Name\"])
get_node(\"shop/Control/Name\").text = Global.items[currentItem][\"Name\"]
get_node(\"shop/Control/Des\").text = Global.items[currentItem][\"Des\"]
get_node(\"shop/Control/Des\").text += \"\\n Cost: \" + str(Global.items[currentItem][\"Cost\"])
func _on_body_exited(body):
pass # Replace with function body.
"
[sub_resource type="RectangleShape2D" id="RectangleShape2D_anpjv"]
size = Vector2(29, 20)
[node name="world" type="Node2D"]
script = ExtResource("1_y7fem")
[node name="Panel" parent="." instance=ExtResource("7_kuy7f")]
visible = false
[node name="TileMap" type="TileMap" parent="."]
texture_filter = 1
tile_set = ExtResource("1_6vgqx")
cell_quadrant_size = 32
format = 2
layer_0/name = "first"
layer_0/z_index = -1
layer_0/tile_data = PackedInt32Array(1900585, 196614, 1, 1900589, 196614, 1, 1900590, 196614, 1, 1835056, 196614, 1, 1835055, 196614, 1, 1835054, 196614, 1, 1835053, 196614, 1, 1966126, 393222, 7, 1966125, 393222, 7, 1966124, 393222, 7, 1966123, 393222, 7, 2097192, 327686, 8, 2162728, 327686, 8, 1900583, 196614, 1, 2031654, 196614, 1, 2097190, 196614, 1, 2031655, 196614, 1, 2097191, 196614, 1, 2162727, 196614, 1, 2162726, 196614, 1, 1835057, 196614, 1, 1900593, 196614, 1, 2162737, 458758, 8, 2097193, 393222, 8, 2162729, 393222, 8, 2162730, 393222, 8, 2162734, 393222, 8, 2097199, 393222, 8, 2162736, 393222, 8, 2162735, 393222, 8, 1769510, 196614, 1, 1769511, 196614, 1, 1769514, 196614, 1, 1769515, 196614, 1, 1769516, 196614, 1, 1769517, 196614, 1, 1769518, 196614, 1, 1769519, 196614, 1, 1769520, 196614, 1, 1769521, 196614, 1, 1703985, 196614, 1, 1703984, 196614, 1, 1703983, 196614, 1, 1703982, 196614, 1, 1703981, 196614, 1, 1703980, 196614, 1, 1703979, 196614, 1, 1703978, 196614, 1, 1703977, 196614, 1, 1703976, 196614, 1, 1703975, 196614, 1, 1703974, 196614, 1, 1703973, 196614, 1, 1769509, 196614, 1, 1835045, 196614, 1, 2031653, 196614, 1, 2097189, 196614, 1, 2162725, 196614, 1, 2162724, 196614, 1, 2162723, 196614, 1, 2097187, 196614, 1, 2031651, 196614, 1, 1966115, 196614, 1, 1900579, 196614, 1, 1835043, 196614, 1, 1769507, 196614, 1, 1703971, 196614, 1, 1638435, 196614, 1, 1638436, 196614, 1, 1572901, 196614, 1, 1572902, 196614, 1, 1572903, 196614, 1, 1572904, 196614, 1, 1572905, 196614, 1, 1572906, 196614, 1, 1572907, 196614, 1, 1638443, 196614, 1, 1638444, 196614, 1, 1638445, 196614, 1, 1638446, 196614, 1, 1638447, 196614, 1, 1638448, 196614, 1, 1638442, 196614, 1, 1638441, 196614, 1, 1638440, 196614, 1, 1638439, 196614, 1, 1638438, 196614, 1, 1638437, 196614, 1, 1703972, 196614, 1, 1769508, 196614, 1, 1835044, 196614, 1, 1900580, 196614, 1, 2031652, 196614, 1, 2097188, 196614, 1, 1966116, 196614, 1, 1572900, 196614, 1, 1572899, 196614, 1, 1572908, 196614, 1, 1572909, 196614, 1, 1572910, 196614, 1, 1572911, 196614, 1, 1572912, 196614, 1, 1572913, 196614, 1, 1638449, 196614, 1, 1441829, 262150, 6, 1507366, 262150, 6, 1507367, 262150, 6, 1835046, 196614, 1, 1900581, 196614, 1, 1966117, 196614, 1, 1900582, 196614, 1, 1835048, 196614, 1, 1900584, 196614, 1, 1966118, 196614, 1, 1966119, 196614, 1, 1966120, 131078, 7, 1966122, 393222, 7, 1900586, 196614, 1, 1835050, 196614, 1, 1835052, 196614, 1, 1900588, 196614, 1, 1835049, 196614, 1, 1769513, 196614, 1, 1769512, 196614, 1, 1835047, 196614, 1, 1835051, 196614, 1, 1900587, 196614, 1, 1900592, 196614, 1, 1900591, 196614, 1, 1966127, 393222, 7, 1966128, 393222, 7, 1966129, 458758, 7, 2031663, 393222, 8, 2031664, 393222, 8, 2031665, 458758, 8, 2097201, 458758, 8, 2097200, 393222, 8, 2031662, 393222, 8, 2031658, 393222, 8, 2031657, 393222, 8, 2031656, 327686, 8, 2031661, 393222, 8, 2162733, 393222, 8, 2031660, 393222, 8, 2162732, 393222, 8, 2162731, 393222, 8, 2031659, 393222, 8, 2097195, 393222, 8, 2097196, 393222, 8, 2097197, 393222, 8, 2097198, 393222, 8, 1966121, 393222, 7, 2097194, 393222, 8)
layer_1/name = "second"
layer_1/enabled = true
layer_1/modulate = Color(1, 1, 1, 1)
layer_1/y_sort_enabled = false
layer_1/y_sort_origin = 0
layer_1/z_index = 0
layer_1/tile_data = PackedInt32Array(2097194, 9, 0, 2097198, 9, 0)
[node name="enemy" parent="." node_paths=PackedStringArray("pl") instance=ExtResource("5_2pm0o")]
position = Vector2(736, 459)
pl = NodePath("../player")
[node name="Area2D" type="Area2D" parent="."]
light_mask = 2
visibility_layer = 2
position = Vector2(653, 405)
collision_layer = 3
collision_mask = 3
script = SubResource("GDScript_2laos")
[node name="Sprite2D" type="Sprite2D" parent="Area2D"]
z_index = -1
position = Vector2(2.00001, 0)
scale = Vector2(0.242188, 0.304688)
texture = ExtResource("6_ja1s2")
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2(-0.5, -3)
shape = SubResource("RectangleShape2D_anpjv")
[node name="shop" parent="Area2D" instance=ExtResource("7_jxqxq")]
[node name="player" parent="." instance=ExtResource("4_rkwjr")]
position = Vector2(606, 478)
[connection signal="body_entered" from="Area2D" to="Area2D" method="_on_body_entered"]
[connection signal="body_exited" from="Area2D" to="Area2D" method="_on_body_exited"]