From e573ba880c3dae938361ae3e4c5189946cd5f63c Mon Sep 17 00:00:00 2001 From: Jan Haller Date: Wed, 1 Mar 2023 23:40:45 +0100 Subject: [PATCH] Reopen dodge-the-creeps in Godot 4.0 stable editor --- examples/dodge-the-creeps/godot/Main.tscn | 4 +- examples/dodge-the-creeps/godot/Mob.tscn | 41 +++++++++++++------ examples/dodge-the-creeps/godot/Player.tscn | 28 +++++++++---- examples/dodge-the-creeps/godot/project.godot | 18 ++++---- 4 files changed, 60 insertions(+), 31 deletions(-) diff --git a/examples/dodge-the-creeps/godot/Main.tscn b/examples/dodge-the-creeps/godot/Main.tscn index 09599b2b3..9b108cb6a 100644 --- a/examples/dodge-the-creeps/godot/Main.tscn +++ b/examples/dodge-the-creeps/godot/Main.tscn @@ -2,8 +2,8 @@ [ext_resource type="PackedScene" uid="uid://4vwrqjegqwpj" path="res://Player.tscn" id="3"] [ext_resource type="PackedScene" uid="uid://b6f427lco0mqk" path="res://Hud.tscn" id="4"] -[ext_resource type="AudioStream" uid="uid://jy3fk3ujnkpl" path="res://art/House In a Forest Loop.ogg" id="5"] -[ext_resource type="AudioStream" uid="uid://cfb6f1t1p6axm" path="res://art/gameover.wav" id="6"] +[ext_resource type="AudioStream" uid="uid://4nydgv0blw0f" path="res://art/House In a Forest Loop.ogg" id="5"] +[ext_resource type="AudioStream" uid="uid://bfm4mpbt2cmpk" path="res://art/gameover.wav" id="6"] [sub_resource type="Curve2D" id="1"] _data = { diff --git a/examples/dodge-the-creeps/godot/Mob.tscn b/examples/dodge-the-creeps/godot/Mob.tscn index 4dcb00e97..f9c58bbfe 100644 --- a/examples/dodge-the-creeps/godot/Mob.tscn +++ b/examples/dodge-the-creeps/godot/Mob.tscn @@ -1,25 +1,43 @@ [gd_scene load_steps=9 format=3 uid="uid://rkdnhqgf2hpj"] -[ext_resource type="Texture2D" uid="uid://ch2bfqohapw00" path="res://art/enemyFlyingAlt_1.png" id="2"] -[ext_resource type="Texture2D" uid="uid://uhy7j2necuj2" path="res://art/enemyFlyingAlt_2.png" id="3"] -[ext_resource type="Texture2D" uid="uid://dd56ab6ouwms7" path="res://art/enemyWalking_1.png" id="4"] -[ext_resource type="Texture2D" uid="uid://dulw5juue3ivn" path="res://art/enemyWalking_2.png" id="5"] -[ext_resource type="Texture2D" uid="uid://cnwoep5enlhrj" path="res://art/enemySwimming_1.png" id="6"] -[ext_resource type="Texture2D" uid="uid://eqshh2v5g0dn" path="res://art/enemySwimming_2.png" id="7"] +[ext_resource type="Texture2D" uid="uid://cm5gcq5ye1dfp" path="res://art/enemyFlyingAlt_1.png" id="2"] +[ext_resource type="Texture2D" uid="uid://bgm216v7s45eh" path="res://art/enemyFlyingAlt_2.png" id="3"] +[ext_resource type="Texture2D" uid="uid://8mvo2d5mwhbr" path="res://art/enemyWalking_1.png" id="4"] +[ext_resource type="Texture2D" uid="uid://c8wjbhrgviadh" path="res://art/enemyWalking_2.png" id="5"] +[ext_resource type="Texture2D" uid="uid://bmw4gn8qp4owc" path="res://art/enemySwimming_1.png" id="6"] +[ext_resource type="Texture2D" uid="uid://bciy3d2t3uuvf" path="res://art/enemySwimming_2.png" id="7"] [sub_resource type="SpriteFrames" id="1"] animations = [{ -"frames": [ExtResource("2"), ExtResource("3")], +"frames": [{ +"duration": 1.0, +"texture": ExtResource("2") +}, { +"duration": 1.0, +"texture": ExtResource("3") +}], "loop": true, "name": &"fly", "speed": 3.0 }, { -"frames": [ExtResource("6"), ExtResource("7")], +"frames": [{ +"duration": 1.0, +"texture": ExtResource("6") +}, { +"duration": 1.0, +"texture": ExtResource("7") +}], "loop": true, "name": &"swim", "speed": 4.0 }, { -"frames": [ExtResource("4"), ExtResource("5")], +"frames": [{ +"duration": 1.0, +"texture": ExtResource("4") +}, { +"duration": 1.0, +"texture": ExtResource("5") +}], "loop": true, "name": &"walk", "speed": 4.0 @@ -35,9 +53,8 @@ gravity_scale = 0.0 [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] scale = Vector2(0.75, 0.75) -frames = SubResource("1") -animation = &"walk" -playing = true +sprite_frames = SubResource("1") +animation = &"fly" [node name="CollisionShape2D" type="CollisionShape2D" parent="."] rotation = 1.5708 diff --git a/examples/dodge-the-creeps/godot/Player.tscn b/examples/dodge-the-creeps/godot/Player.tscn index 222f857bf..2ce4f54ff 100644 --- a/examples/dodge-the-creeps/godot/Player.tscn +++ b/examples/dodge-the-creeps/godot/Player.tscn @@ -1,18 +1,30 @@ [gd_scene load_steps=12 format=3 uid="uid://4vwrqjegqwpj"] -[ext_resource type="Texture2D" uid="uid://bei50n77gmlml" path="res://art/playerGrey_walk1.png" id="2"] -[ext_resource type="Texture2D" uid="uid://bdkoaa5a3c44c" path="res://art/playerGrey_walk2.png" id="3"] -[ext_resource type="Texture2D" uid="uid://qpg7fsh1wnd6" path="res://art/playerGrey_up1.png" id="4"] -[ext_resource type="Texture2D" uid="uid://c4vx8t665is8j" path="res://art/playerGrey_up2.png" id="5"] +[ext_resource type="Texture2D" uid="uid://bj4l4w7uqqvj8" path="res://art/playerGrey_walk1.png" id="2"] +[ext_resource type="Texture2D" uid="uid://m72luixufvrn" path="res://art/playerGrey_walk2.png" id="3"] +[ext_resource type="Texture2D" uid="uid://capk1keirob5u" path="res://art/playerGrey_up1.png" id="4"] +[ext_resource type="Texture2D" uid="uid://l7hs5mf40b2s" path="res://art/playerGrey_up2.png" id="5"] [sub_resource type="SpriteFrames" id="1"] animations = [{ -"frames": [ExtResource("2"), ExtResource("3")], +"frames": [{ +"duration": 1.0, +"texture": ExtResource("2") +}, { +"duration": 1.0, +"texture": ExtResource("3") +}], "loop": true, "name": &"right", "speed": 5.0 }, { -"frames": [ExtResource("4"), ExtResource("5")], +"frames": [{ +"duration": 1.0, +"texture": ExtResource("4") +}, { +"duration": 1.0, +"texture": ExtResource("5") +}], "loop": true, "name": &"up", "speed": 5.0 @@ -46,7 +58,7 @@ z_index = 10 [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] scale = Vector2(0.5, 0.5) -frames = SubResource("1") +sprite_frames = SubResource("1") animation = &"right" [node name="CollisionShape2D" type="CollisionShape2D" parent="."] @@ -55,8 +67,8 @@ shape = SubResource("2") [node name="Trail" type="GPUParticles2D" parent="."] z_index = -1 amount = 10 -speed_scale = 2.0 process_material = SubResource("7") texture = ExtResource("2") +speed_scale = 2.0 [connection signal="body_entered" from="." to="." method="on_player_body_entered"] diff --git a/examples/dodge-the-creeps/godot/project.godot b/examples/dodge-the-creeps/godot/project.godot index 5fe48abe7..4e113f690 100644 --- a/examples/dodge-the-creeps/godot/project.godot +++ b/examples/dodge-the-creeps/godot/project.godot @@ -37,39 +37,39 @@ window/stretch/mode="canvas_items" move_left={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":16777231,"physical_keycode":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":65,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":16777231,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":65,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null) , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null) ] } move_right={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":16777233,"physical_keycode":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":68,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":16777233,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":68,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null) , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null) ] } move_up={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":16777232,"physical_keycode":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":87,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":16777232,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":87,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null) , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null) ] } move_down={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":16777234,"physical_keycode":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":83,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":16777234,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":83,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null) , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null) ] } start_game={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":16777221,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":16777221,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null) ] }