Skip to content

Commit 5048907

Browse files
committed
Fix dodge-the-creeps example
Changes: * Fix UI input (allow WASD in addition to arrow keys) * Fix font * Update scene files (addresses UID warnings) * Simpler animation randomization * Remove GDScript files
1 parent 21f95f7 commit 5048907

File tree

14 files changed

+57
-224
lines changed

14 files changed

+57
-224
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
list=[]
1+
list=Array[Dictionary]([])

examples/dodge-the-creeps/godot/Hud.gd

Lines changed: 0 additions & 32 deletions
This file was deleted.

examples/dodge-the-creeps/godot/Hud.tscn

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1-
[gd_scene load_steps=2 format=3 uid="uid://b6f427lco0mqk"]
1+
[gd_scene load_steps=4 format=3 uid="uid://ccqoreueuxdb7"]
2+
3+
[ext_resource type="FontFile" uid="uid://cit6gwe5px1q8" path="res://fonts/Xolonium-Regular.ttf" id="1_poxll"]
4+
5+
[sub_resource type="InputEventAction" id="InputEventAction_fopy7"]
6+
action = &"start_game"
27

38
[sub_resource type="Shortcut" id="4"]
9+
events = [SubResource("InputEventAction_fopy7")]
410

511
[node name="Hud" type="Hud"]
612

@@ -9,6 +15,7 @@ anchors_preset = 10
915
anchor_right = 1.0
1016
offset_bottom = 78.0
1117
grow_horizontal = 2
18+
theme_override_fonts/font = ExtResource("1_poxll")
1219
theme_override_font_sizes/font_size = 60
1320
text = "0"
1421
horizontal_alignment = 1
@@ -22,6 +29,7 @@ offset_top = -79.5
2229
offset_bottom = 79.5
2330
grow_horizontal = 2
2431
grow_vertical = 2
32+
theme_override_fonts/font = ExtResource("1_poxll")
2533
theme_override_font_sizes/font_size = 60
2634
text = "Dodge the
2735
Creeps"
@@ -39,6 +47,7 @@ offset_right = 90.0
3947
offset_bottom = -100.0
4048
grow_horizontal = 2
4149
grow_vertical = 0
50+
theme_override_fonts/font = ExtResource("1_poxll")
4251
theme_override_font_sizes/font_size = 60
4352
shortcut = SubResource("4")
4453
text = "Start"

examples/dodge-the-creeps/godot/Main.gd

Lines changed: 0 additions & 62 deletions
This file was deleted.

examples/dodge-the-creeps/godot/Main.tscn

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[gd_scene load_steps=6 format=3 uid="uid://cyfwty2q3rdse"]
22

33
[ext_resource type="PackedScene" uid="uid://4vwrqjegqwpj" path="res://Player.tscn" id="3"]
4-
[ext_resource type="PackedScene" uid="uid://b6f427lco0mqk" path="res://Hud.tscn" id="4"]
5-
[ext_resource type="AudioStream" uid="uid://4nydgv0blw0f" path="res://art/House In a Forest Loop.ogg" id="5"]
6-
[ext_resource type="AudioStream" uid="uid://bfm4mpbt2cmpk" path="res://art/gameover.wav" id="6"]
4+
[ext_resource type="PackedScene" uid="uid://ccqoreueuxdb7" path="res://Hud.tscn" id="4"]
5+
[ext_resource type="AudioStream" uid="uid://q2pf4fr8d0ks" path="res://art/House In a Forest Loop.ogg" id="5"]
6+
[ext_resource type="AudioStream" uid="uid://dw26fpygeag8o" path="res://art/gameover.wav" id="6"]
77

88
[sub_resource type="Curve2D" id="1"]
99
_data = {

examples/dodge-the-creeps/godot/Mob.gd

Lines changed: 0 additions & 12 deletions
This file was deleted.

examples/dodge-the-creeps/godot/Mob.tscn

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[gd_scene load_steps=9 format=3 uid="uid://rkdnhqgf2hpj"]
22

3-
[ext_resource type="Texture2D" uid="uid://cm5gcq5ye1dfp" path="res://art/enemyFlyingAlt_1.png" id="2"]
4-
[ext_resource type="Texture2D" uid="uid://bgm216v7s45eh" path="res://art/enemyFlyingAlt_2.png" id="3"]
5-
[ext_resource type="Texture2D" uid="uid://8mvo2d5mwhbr" path="res://art/enemyWalking_1.png" id="4"]
6-
[ext_resource type="Texture2D" uid="uid://c8wjbhrgviadh" path="res://art/enemyWalking_2.png" id="5"]
7-
[ext_resource type="Texture2D" uid="uid://bmw4gn8qp4owc" path="res://art/enemySwimming_1.png" id="6"]
8-
[ext_resource type="Texture2D" uid="uid://bciy3d2t3uuvf" path="res://art/enemySwimming_2.png" id="7"]
3+
[ext_resource type="Texture2D" uid="uid://yqglrrsx7j1f" path="res://art/enemyFlyingAlt_1.png" id="2"]
4+
[ext_resource type="Texture2D" uid="uid://bpot8awhdn6ph" path="res://art/enemyFlyingAlt_2.png" id="3"]
5+
[ext_resource type="Texture2D" uid="uid://bu4221t7qpa7d" path="res://art/enemyWalking_1.png" id="4"]
6+
[ext_resource type="Texture2D" uid="uid://booij5t7h4efb" path="res://art/enemyWalking_2.png" id="5"]
7+
[ext_resource type="Texture2D" uid="uid://5lvm88ij4jqn" path="res://art/enemySwimming_1.png" id="6"]
8+
[ext_resource type="Texture2D" uid="uid://bng45cvsgufqc" path="res://art/enemySwimming_2.png" id="7"]
99

1010
[sub_resource type="SpriteFrames" id="1"]
1111
animations = [{
@@ -54,7 +54,7 @@ gravity_scale = 0.0
5454
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
5555
scale = Vector2(0.75, 0.75)
5656
sprite_frames = SubResource("1")
57-
animation = &"fly"
57+
animation = &"walk"
5858

5959
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
6060
rotation = 1.5708

examples/dodge-the-creeps/godot/Player.gd

Lines changed: 0 additions & 55 deletions
This file was deleted.

examples/dodge-the-creeps/godot/Player.tscn

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[gd_scene load_steps=12 format=3 uid="uid://4vwrqjegqwpj"]
22

3-
[ext_resource type="Texture2D" uid="uid://bj4l4w7uqqvj8" path="res://art/playerGrey_walk1.png" id="2"]
4-
[ext_resource type="Texture2D" uid="uid://m72luixufvrn" path="res://art/playerGrey_walk2.png" id="3"]
5-
[ext_resource type="Texture2D" uid="uid://capk1keirob5u" path="res://art/playerGrey_up1.png" id="4"]
6-
[ext_resource type="Texture2D" uid="uid://l7hs5mf40b2s" path="res://art/playerGrey_up2.png" id="5"]
3+
[ext_resource type="Texture2D" uid="uid://ftkxr8r4qghp" path="res://art/playerGrey_walk1.png" id="2"]
4+
[ext_resource type="Texture2D" uid="uid://couyhcegeihme" path="res://art/playerGrey_walk2.png" id="3"]
5+
[ext_resource type="Texture2D" uid="uid://b4yyoafu8bi0q" path="res://art/playerGrey_up1.png" id="4"]
6+
[ext_resource type="Texture2D" uid="uid://bko65a0nd66st" path="res://art/playerGrey_up2.png" id="5"]
77

88
[sub_resource type="SpriteFrames" id="1"]
99
animations = [{

examples/dodge-the-creeps/godot/fonts/Xolonium-Regular.tres

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)