Skip to content

Commit 09bef69

Browse files
committed
selesai
1 parent c7e8d60 commit 09bef69

19 files changed

+1046
-45
lines changed

TitleScreen.gd

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
extends Sprite2D
2+
3+
4+
# Called when the node enters the scene tree for the first time.
5+
func _ready():
6+
pass # Replace with function body.
7+
8+
9+
# Called every frame. 'delta' is the elapsed time since the previous frame.
10+
func _process(delta):
11+
pass
12+
13+
var farm = preload("res://scenes/farm.tscn")
14+
15+
16+
func _on_button_pressed():
17+
get_parent().add_child(farm.instantiate())
18+
visible = false

assets/ui/Logo_Type.png

14.5 KB
Loading

assets/ui/Logo_Type.png.import

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://i86gx32fgfhl"
6+
path="res://.godot/imported/Logo_Type.png-be292ab0d2438335963fc0d440e2b10c.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://assets/ui/Logo_Type.png"
14+
dest_files=["res://.godot/imported/Logo_Type.png-be292ab0d2438335963fc0d440e2b10c.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/hdr_compression=1
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1

assets/ui/title_screen.png

10 KB
Loading

assets/ui/title_screen.png.import

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://de2a8umsjonkn"
6+
path="res://.godot/imported/title_screen.png-96ed740b51273507e08636dd3ed7d1a7.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://assets/ui/title_screen.png"
14+
dest_files=["res://.godot/imported/title_screen.png-96ed740b51273507e08636dd3ed7d1a7.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/hdr_compression=1
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1

main.tscn

+42-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,46 @@
1-
[gd_scene load_steps=2 format=3 uid="uid://cv0c7fnbntwuy"]
1+
[gd_scene load_steps=4 format=3 uid="uid://cv0c7fnbntwuy"]
22

3-
[ext_resource type="PackedScene" uid="uid://3u3nqu17l70u" path="res://scenes/farm.tscn" id="1_sci7n"]
3+
[ext_resource type="Texture2D" uid="uid://de2a8umsjonkn" path="res://assets/ui/title_screen.png" id="1_umkjn"]
4+
[ext_resource type="Texture2D" uid="uid://i86gx32fgfhl" path="res://assets/ui/Logo_Type.png" id="2_2k7im"]
5+
[ext_resource type="Script" path="res://TitleScreen.gd" id="2_k0r07"]
46

57
[node name="Main" type="Node2D"]
68

7-
[node name="Farm" parent="." instance=ExtResource("1_sci7n")]
8-
position = Vector2(-28, -60)
9+
[node name="TitleScreen" type="Sprite2D" parent="."]
10+
position = Vector2(216.5, 123)
11+
scale = Vector2(0.493612, 0.645669)
12+
texture = ExtResource("1_umkjn")
13+
script = ExtResource("2_k0r07")
14+
15+
[node name="LogoType" type="Sprite2D" parent="TitleScreen"]
16+
position = Vector2(-9.11642, -105.317)
17+
scale = Vector2(1.3, 0.994)
18+
texture = ExtResource("2_2k7im")
19+
hframes = 2
20+
21+
[node name="LogoType2" type="Sprite2D" parent="TitleScreen"]
22+
position = Vector2(56.6399, -30.5294)
23+
rotation = -0.261799
24+
scale = Vector2(1.3, 0.994)
25+
texture = ExtResource("2_2k7im")
26+
hframes = 2
27+
frame = 1
28+
29+
[node name="Button" type="Button" parent="TitleScreen"]
30+
offset_left = -329.206
31+
offset_top = 83.6341
32+
offset_right = -207.206
33+
offset_bottom = 114.634
34+
scale = Vector2(2, 2)
35+
text = "Demo Farming"
36+
37+
[node name="Button2" type="Button" parent="TitleScreen"]
38+
offset_left = 37.4789
39+
offset_top = 82.0854
40+
offset_right = 158.479
41+
offset_bottom = 113.085
42+
scale = Vector2(2, 2)
43+
text = "Demo Cooking
44+
"
45+
46+
[connection signal="pressed" from="TitleScreen/Button" to="TitleScreen" method="_on_button_pressed"]

project.godot

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ config/icon="res://icon.svg"
1818
[autoload]
1919

2020
Global="*res://scenes/global_inventory.gd"
21+
TimeInven="*res://scripts/TimeInven.gd"
2122

2223
[display]
2324

scenes/Slots.gd

+3
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,15 @@ func _process(_delta):
2727
func selected_slots_up():
2828
active_slot = (active_slot + 1) % inven_length
2929
selected_slots.emit(active_slot)
30+
TimeInven.seed_slot = active_slot
31+
3032

3133
func selected_slots_down():
3234
if active_slot == 0:
3335
active_slot = inven_length - 1
3436
else:
3537
active_slot -= 1
38+
TimeInven.seed_slot = active_slot
3639
selected_slots.emit(active_slot)
3740

3841
func scroll_timeout():

scenes/dead_brute.tscn

+159-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
1-
[gd_scene load_steps=7 format=3 uid="uid://cy8tgptglfnn6"]
1+
[gd_scene load_steps=14 format=3 uid="uid://cy8tgptglfnn6"]
22

33
[ext_resource type="Texture2D" uid="uid://bynldf85n8w1h" path="res://assets/sprite/BayanganBrute.png" id="1_8abw4"]
44
[ext_resource type="Script" path="res://scripts/DeadBody.gd" id="1_g5qdl"]
55
[ext_resource type="Texture2D" uid="uid://b34gb0nbpehp0" path="res://assets/animation/brute_dead.png" id="1_mxcl0"]
66
[ext_resource type="Texture2D" uid="uid://bmi3liujnbyx6" path="res://assets/sprite/jamur/BenihRegula.png" id="2_uq3kk"]
77
[ext_resource type="Texture2D" uid="uid://bjluwqg3po1dx" path="res://assets/sprite/jamur/Regular Mushroom.png" id="3_inxlu"]
8+
[ext_resource type="Texture2D" uid="uid://5hxxvpwd1vxp" path="res://assets/sprite/jamur/Doom mushroom Seed.png" id="5_ow6my"]
9+
[ext_resource type="Texture2D" uid="uid://cxdq2ol40ibsd" path="res://assets/Jamur/Seed/Benih Crown.png" id="6_e7c00"]
10+
[ext_resource type="Texture2D" uid="uid://brfk03li5k3ei" path="res://assets/sprite/jamur/Rotten Spice seed.png" id="7_tx40b"]
11+
[ext_resource type="Texture2D" uid="uid://deal1y30457ae" path="res://assets/sprite/jamur/Doom mushroom.png" id="9_anhse"]
12+
[ext_resource type="Texture2D" uid="uid://c1jngt7srsllt" path="res://assets/Jamur/Mushroom/crown mushroom.png" id="10_cxmht"]
13+
[ext_resource type="Texture2D" uid="uid://tvit0651yvdx" path="res://assets/sprite/jamur/Rotten mushroom.png" id="11_digen"]
814

915
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_43xo7"]
1016
radius = 5.0
1117
height = 22.0
1218

19+
[sub_resource type="RectangleShape2D" id="RectangleShape2D_8miho"]
20+
size = Vector2(49, 25)
21+
1322
[node name="DeadBrute" type="StaticBody2D"]
1423
z_index = 1
1524
script = ExtResource("1_g5qdl")
@@ -32,35 +41,178 @@ shape = SubResource("CapsuleShape2D_43xo7")
3241
[node name="Benih" type="Node2D" parent="."]
3342
visible = false
3443

35-
[node name="Sprite2D" type="Sprite2D" parent="Benih"]
44+
[node name="0" type="Node2D" parent="Benih"]
45+
visible = false
46+
47+
[node name="Sprite2D" type="Sprite2D" parent="Benih/0"]
3648
position = Vector2(-12, 1)
3749
scale = Vector2(0.3, 0.3)
3850
texture = ExtResource("2_uq3kk")
3951

40-
[node name="Sprite2D2" type="Sprite2D" parent="Benih"]
52+
[node name="Sprite2D2" type="Sprite2D" parent="Benih/0"]
4153
position = Vector2(-8, 10)
4254
scale = Vector2(0.3, 0.3)
4355
texture = ExtResource("2_uq3kk")
4456

45-
[node name="Sprite2D3" type="Sprite2D" parent="Benih"]
57+
[node name="Sprite2D3" type="Sprite2D" parent="Benih/0"]
4658
position = Vector2(0, 3)
4759
scale = Vector2(0.3, 0.3)
4860
texture = ExtResource("2_uq3kk")
4961

62+
[node name="1" type="Node2D" parent="Benih"]
63+
visible = false
64+
65+
[node name="Sprite2D" type="Sprite2D" parent="Benih/1"]
66+
position = Vector2(-12, 1)
67+
scale = Vector2(0.3, 0.3)
68+
texture = ExtResource("5_ow6my")
69+
70+
[node name="Sprite2D2" type="Sprite2D" parent="Benih/1"]
71+
position = Vector2(-8, 10)
72+
scale = Vector2(0.3, 0.3)
73+
texture = ExtResource("5_ow6my")
74+
75+
[node name="Sprite2D3" type="Sprite2D" parent="Benih/1"]
76+
position = Vector2(0, 3)
77+
scale = Vector2(0.3, 0.3)
78+
texture = ExtResource("5_ow6my")
79+
80+
[node name="2" type="Node2D" parent="Benih"]
81+
visible = false
82+
83+
[node name="Sprite2D" type="Sprite2D" parent="Benih/2"]
84+
position = Vector2(-12, 1)
85+
scale = Vector2(0.3, 0.3)
86+
texture = ExtResource("6_e7c00")
87+
88+
[node name="Sprite2D2" type="Sprite2D" parent="Benih/2"]
89+
position = Vector2(-8, 10)
90+
scale = Vector2(0.3, 0.3)
91+
texture = ExtResource("6_e7c00")
92+
93+
[node name="Sprite2D3" type="Sprite2D" parent="Benih/2"]
94+
position = Vector2(0, 3)
95+
scale = Vector2(0.3, 0.3)
96+
texture = ExtResource("6_e7c00")
97+
98+
[node name="3" type="Node2D" parent="Benih"]
99+
visible = false
100+
101+
[node name="Sprite2D" type="Sprite2D" parent="Benih/3"]
102+
position = Vector2(-12, 1)
103+
scale = Vector2(0.3, 0.3)
104+
texture = ExtResource("7_tx40b")
105+
106+
[node name="Sprite2D2" type="Sprite2D" parent="Benih/3"]
107+
position = Vector2(-8, 10)
108+
scale = Vector2(0.3, 0.3)
109+
texture = ExtResource("7_tx40b")
110+
111+
[node name="Sprite2D3" type="Sprite2D" parent="Benih/3"]
112+
position = Vector2(0, 3)
113+
scale = Vector2(0.3, 0.3)
114+
texture = ExtResource("7_tx40b")
115+
50116
[node name="Jamur" type="Node2D" parent="."]
51117
visible = false
52118

53-
[node name="Sprite2D" type="Sprite2D" parent="Jamur"]
119+
[node name="0" type="Node2D" parent="Jamur"]
120+
visible = false
121+
122+
[node name="Sprite2D" type="Sprite2D" parent="Jamur/0"]
54123
position = Vector2(-12, 0)
55124
scale = Vector2(0.5, 0.5)
56125
texture = ExtResource("3_inxlu")
57126

58-
[node name="Sprite2D2" type="Sprite2D" parent="Jamur"]
127+
[node name="Sprite2D2" type="Sprite2D" parent="Jamur/0"]
59128
position = Vector2(0, 2)
60129
scale = Vector2(0.5, 0.5)
61130
texture = ExtResource("3_inxlu")
62131

63-
[node name="Sprite2D3" type="Sprite2D" parent="Jamur"]
132+
[node name="Sprite2D3" type="Sprite2D" parent="Jamur/0"]
64133
position = Vector2(-8, 9)
65134
scale = Vector2(0.5, 0.5)
66135
texture = ExtResource("3_inxlu")
136+
137+
[node name="1" type="Node2D" parent="Jamur"]
138+
visible = false
139+
140+
[node name="Sprite2D" type="Sprite2D" parent="Jamur/1"]
141+
position = Vector2(-12, 0)
142+
scale = Vector2(0.5, 0.5)
143+
texture = ExtResource("9_anhse")
144+
145+
[node name="Sprite2D2" type="Sprite2D" parent="Jamur/1"]
146+
position = Vector2(0, 2)
147+
scale = Vector2(0.5, 0.5)
148+
texture = ExtResource("9_anhse")
149+
150+
[node name="Sprite2D3" type="Sprite2D" parent="Jamur/1"]
151+
position = Vector2(-8, 9)
152+
scale = Vector2(0.5, 0.5)
153+
texture = ExtResource("9_anhse")
154+
155+
[node name="2" type="Node2D" parent="Jamur"]
156+
visible = false
157+
158+
[node name="Sprite2D" type="Sprite2D" parent="Jamur/2"]
159+
position = Vector2(-12, 0)
160+
scale = Vector2(0.5, 0.5)
161+
texture = ExtResource("10_cxmht")
162+
163+
[node name="Sprite2D2" type="Sprite2D" parent="Jamur/2"]
164+
position = Vector2(0, 2)
165+
scale = Vector2(0.5, 0.5)
166+
texture = ExtResource("10_cxmht")
167+
168+
[node name="Sprite2D3" type="Sprite2D" parent="Jamur/2"]
169+
position = Vector2(-8, 9)
170+
scale = Vector2(0.5, 0.5)
171+
texture = ExtResource("10_cxmht")
172+
173+
[node name="3" type="Node2D" parent="Jamur"]
174+
visible = false
175+
176+
[node name="Sprite2D" type="Sprite2D" parent="Jamur/3"]
177+
position = Vector2(-12, 0)
178+
scale = Vector2(0.5, 0.5)
179+
texture = ExtResource("11_digen")
180+
181+
[node name="Sprite2D2" type="Sprite2D" parent="Jamur/3"]
182+
position = Vector2(0, 2)
183+
scale = Vector2(0.5, 0.5)
184+
texture = ExtResource("11_digen")
185+
186+
[node name="Sprite2D3" type="Sprite2D" parent="Jamur/3"]
187+
position = Vector2(-8, 9)
188+
scale = Vector2(0.5, 0.5)
189+
texture = ExtResource("11_digen")
190+
191+
[node name="Area2D" type="Area2D" parent="."]
192+
collision_layer = 2
193+
collision_mask = 2
194+
195+
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
196+
position = Vector2(-5.5, 7.5)
197+
shape = SubResource("RectangleShape2D_8miho")
198+
199+
[node name="Start" type="Timer" parent="."]
200+
wait_time = 5.0
201+
one_shot = true
202+
203+
[node name="Label" type="Label" parent="."]
204+
offset_left = -16.0
205+
offset_top = -13.0
206+
offset_right = 24.0
207+
offset_bottom = 13.0
208+
scale = Vector2(0.5, 0.5)
209+
size_flags_horizontal = 4
210+
text = "Q to plant"
211+
horizontal_alignment = 1
212+
213+
[node name="Countdown" type="Timer" parent="."]
214+
215+
[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"]
216+
[connection signal="body_exited" from="Area2D" to="." method="_on_area_2d_body_exited"]
217+
[connection signal="timeout" from="Start" to="." method="_on_start_timeout"]
218+
[connection signal="timeout" from="Countdown" to="." method="_on_countdown_timeout"]

0 commit comments

Comments
 (0)