Author SHA1 Message Date
qwsdcvghyu89 562d0da079 Added more grassy tile variants
Release / Export Game (push) Successful in 1m43s
2026-06-15 07:51:19 +10:00
qwsdcvghyu89 6b9bb6da5a Audio additions: jump.ogg - comitting to continue development in another environment.
Release / Export Game (push) Successful in 2m0s
2026-06-15 00:07:56 +10:00
qwsdcvghyu89 e252a94f46 Added grassy tiles
Release / Export Game (push) Successful in 2m12s
2026-06-14 23:21:39 +10:00
15 changed files with 1582 additions and 120 deletions
-7
View File
@@ -1,7 +0,0 @@
{
"sdk": {
"version": "11.0.100-preview.5.26302.115",
"allowPrerelease": true,
"rollForward": "latestPatch"
}
}
+42
View File
@@ -0,0 +1,42 @@
[gd_scene format=3 uid="uid://xanv3qbl1n2u"]
[sub_resource type="Gradient" id="Gradient_nxkc6"]
colors = PackedColorArray(1, 1, 1, 1, 0, 0, 0, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_kfvst"]
gradient = SubResource("Gradient_nxkc6")
fill = 1
fill_from = Vector2(0.5, 0.5)
fill_to = Vector2(0.725, 0)
[node name="Light" type="Node2D" unique_id=658403720]
scale = Vector2(3.105, 3.105)
[node name="BackgroundLight" type="PointLight2D" parent="." unique_id=1870867099]
scale = Vector2(3, 3)
color = Color(1, 0.73333335, 0, 1)
energy = 1.5
shadow_enabled = true
shadow_filter = 1
texture = SubResource("GradientTexture2D_kfvst")
height = 15.0
[node name="ForegroundLight" type="PointLight2D" parent="." unique_id=574997062]
scale = Vector2(5, 5)
color = Color(0.93, 0.837, 0, 0.8)
energy = 0.7
shadow_enabled = true
shadow_filter = 1
shadow_item_cull_mask = 2
texture = SubResource("GradientTexture2D_kfvst")
height = 15.0
[node name="ForegroundNOCLight" type="PointLight2D" parent="." unique_id=2045804818]
scale = Vector2(5, 5)
color = Color(0.93, 0.837, 0, 0.8)
energy = 0.7
range_item_cull_mask = 4
shadow_filter = 1
shadow_item_cull_mask = 4
texture = SubResource("GradientTexture2D_kfvst")
height = 15.0
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -11,7 +11,6 @@ config_version=5
[application]
config/name="WrplatGodot"
config/version="0.1.38"
run/main_scene="uid://r2lb1ommvj6u"
config/features=PackedStringArray("4.6", "C#", "Forward Plus")
config/icon="res://icon.svg"
@@ -108,6 +107,7 @@ turn_back={
2d_render/layer_1="Backgrounds"
2d_render/layer_2="Foregrounds"
2d_render/layer_3="Foregrounds NOC"
[physics]
Binary file not shown.
+19
View File
@@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://dkx1v6c7vv0iq"
path="res://.godot/imported/jump.ogg-d217a70c8ca2fe077e37d9f442c771d3.oggvorbisstr"
[deps]
source_file="res://sounds/sfx/jump.ogg"
dest_files=["res://.godot/imported/jump.ogg-d217a70c8ca2fe077e37d9f442c771d3.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4
Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 42 KiB

File diff suppressed because it is too large Load Diff
+283 -2
View File
@@ -84,13 +84,13 @@ polygon = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
[sub_resource type="OccluderPolygon2D" id="OccluderPolygon2D_yfu7p"]
polygon = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
[sub_resource type="CanvasTexture" id="CanvasTexture_x4gly"]
[sub_resource type="CanvasTexture" id="CanvasTexture_by4n8"]
diffuse_texture = ExtResource("1_by4n8")
normal_texture = ExtResource("2_1bmlt")
specular_shininess = 0.35
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_blkrv"]
texture = SubResource("CanvasTexture_x4gly")
texture = SubResource("CanvasTexture_by4n8")
texture_region_size = Vector2i(32, 32)
0:0/0 = 0
0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 16, 16, 16, 16, -16, -16, -16)
@@ -122,8 +122,24 @@ texture_region_size = Vector2i(32, 32)
7:1/0 = 0
8:1/0 = 0
9:1/0 = 0
9:1/0/terrain_set = 0
9:1/0/terrain = 2
9:1/0/terrains_peering_bit/right_side = 2
9:1/0/terrains_peering_bit/bottom_right_corner = 1
9:1/0/terrains_peering_bit/bottom_side = 2
10:1/next_alternative_id = 2
10:1/0 = 0
10:1/0/terrain_set = 0
10:1/0/terrain = 2
10:1/0/terrains_peering_bit/right_side = 2
10:1/0/terrains_peering_bit/bottom_side = 1
10:1/0/terrains_peering_bit/left_side = 2
11:1/0 = 0
11:1/0/terrain_set = 0
11:1/0/terrain = 2
11:1/0/terrains_peering_bit/right_side = 2
11:1/0/terrains_peering_bit/bottom_side = 1
11:1/0/terrains_peering_bit/left_side = 2
0:2/0 = 0
1:2/0 = 0
1:2/0/terrain_set = 0
@@ -195,9 +211,29 @@ texture_region_size = Vector2i(32, 32)
8:2/0 = 0
8:2/0/occlusion_layer_0/polygon_0/polygon = SubResource("OccluderPolygon2D_yfu7p")
8:2/0/occlusion_layer_1/polygon_0/polygon = SubResource("OccluderPolygon2D_xwwfl")
9:2/next_alternative_id = 2
9:2/0 = 0
9:2/0/terrain_set = 0
9:2/0/terrain = 2
9:2/0/terrains_peering_bit/right_side = 1
9:2/0/terrains_peering_bit/bottom_side = 2
9:2/0/terrains_peering_bit/top_side = 2
10:2/next_alternative_id = 2
10:2/0 = 0
10:2/0/terrain_set = 0
10:2/0/terrain = 1
10:2/0/terrains_peering_bit/right_side = 1
10:2/0/terrains_peering_bit/bottom_right_corner = 1
10:2/0/terrains_peering_bit/bottom_side = 1
11:2/next_alternative_id = 11
11:2/0 = 0
11:2/0/terrain_set = 0
11:2/0/terrain = 1
11:2/0/terrains_peering_bit/right_side = 1
11:2/0/terrains_peering_bit/bottom_right_corner = 1
11:2/0/terrains_peering_bit/bottom_side = 1
11:2/0/terrains_peering_bit/bottom_left_corner = 1
11:2/0/terrains_peering_bit/left_side = 1
0:3/0 = 0
1:3/next_alternative_id = 2
1:3/0 = 0
@@ -359,8 +395,31 @@ texture_region_size = Vector2i(32, 32)
7:3/0/terrains_peering_bit/top_right_corner = 0
8:3/0 = 0
9:3/0 = 0
9:3/0/terrain_set = 0
9:3/0/terrain = 2
9:3/0/terrains_peering_bit/right_side = 1
9:3/0/terrains_peering_bit/bottom_side = 2
9:3/0/terrains_peering_bit/top_side = 2
10:3/next_alternative_id = 10
10:3/0 = 0
10:3/0/terrain_set = 0
10:3/0/terrain = 1
10:3/0/terrains_peering_bit/right_side = 1
10:3/0/terrains_peering_bit/bottom_right_corner = 1
10:3/0/terrains_peering_bit/bottom_side = 1
10:3/0/terrains_peering_bit/top_side = 1
10:3/0/terrains_peering_bit/top_right_corner = 1
11:3/0 = 0
11:3/0/terrain_set = 0
11:3/0/terrain = 1
11:3/0/terrains_peering_bit/right_side = 1
11:3/0/terrains_peering_bit/bottom_right_corner = 1
11:3/0/terrains_peering_bit/bottom_side = 1
11:3/0/terrains_peering_bit/bottom_left_corner = 1
11:3/0/terrains_peering_bit/left_side = 1
11:3/0/terrains_peering_bit/top_left_corner = 1
11:3/0/terrains_peering_bit/top_side = 1
11:3/0/terrains_peering_bit/top_right_corner = 1
0:4/0 = 0
1:4/0 = 0
1:4/0/terrain_set = 0
@@ -440,6 +499,220 @@ texture_region_size = Vector2i(32, 32)
5:4/0/occlusion_layer_0/polygon_0/polygon = SubResource("OccluderPolygon2D_njrqr")
5:4/0/occlusion_layer_1/polygon_0/polygon = SubResource("OccluderPolygon2D_o2foe")
5:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, -16, 16, 16, 16, 16, -16)
8:4/0 = 0
9:4/next_alternative_id = 2
9:4/0 = 0
9:4/0/terrain_set = 0
9:4/0/terrain = 2
9:4/0/terrains_peering_bit/right_side = 1
9:4/0/terrains_peering_bit/bottom_side = 2
9:4/0/terrains_peering_bit/top_side = 2
10:4/next_alternative_id = 2
10:4/0 = 0
10:4/0/terrain_set = 0
10:4/0/terrain = 1
10:4/0/terrains_peering_bit/right_side = 1
10:4/0/terrains_peering_bit/top_side = 1
10:4/0/terrains_peering_bit/top_right_corner = 1
12:1/next_alternative_id = 2
12:1/0 = 0
12:1/0/terrain_set = 0
12:1/0/terrain = 2
12:1/0/terrains_peering_bit/right_side = 2
12:1/0/terrains_peering_bit/bottom_side = 1
12:1/0/terrains_peering_bit/left_side = 2
13:1/0 = 0
13:1/0/terrain_set = 0
13:1/0/terrain = 2
13:1/0/terrains_peering_bit/bottom_side = 2
13:1/0/terrains_peering_bit/bottom_left_corner = 1
13:1/0/terrains_peering_bit/left_side = 2
12:2/next_alternative_id = 2
12:2/0 = 0
12:2/0/terrain_set = 0
12:2/0/terrain = 1
12:2/0/terrains_peering_bit/bottom_side = 1
12:2/0/terrains_peering_bit/bottom_left_corner = 1
12:2/0/terrains_peering_bit/left_side = 1
13:2/next_alternative_id = 2
13:2/0 = 0
13:2/0/terrain_set = 0
13:2/0/terrain = 2
13:2/0/terrains_peering_bit/bottom_side = 2
13:2/0/terrains_peering_bit/left_side = 1
13:2/0/terrains_peering_bit/top_side = 2
12:3/next_alternative_id = 10
12:3/0 = 0
12:3/0/terrain_set = 0
12:3/0/terrain = 1
12:3/0/terrains_peering_bit/bottom_side = 1
12:3/0/terrains_peering_bit/bottom_left_corner = 1
12:3/0/terrains_peering_bit/left_side = 1
12:3/0/terrains_peering_bit/top_left_corner = 1
12:3/0/terrains_peering_bit/top_side = 1
13:3/0 = 0
13:3/0/terrain_set = 0
13:3/0/terrain = 2
13:3/0/terrains_peering_bit/bottom_side = 2
13:3/0/terrains_peering_bit/left_side = 1
13:3/0/terrains_peering_bit/top_side = 2
11:4/next_alternative_id = 10
11:4/0 = 0
11:4/0/terrain_set = 0
11:4/0/terrain = 1
11:4/0/terrains_peering_bit/right_side = 1
11:4/0/terrains_peering_bit/left_side = 1
11:4/0/terrains_peering_bit/top_left_corner = 1
11:4/0/terrains_peering_bit/top_side = 1
11:4/0/terrains_peering_bit/top_right_corner = 1
12:4/next_alternative_id = 2
12:4/0 = 0
12:4/0/terrain_set = 0
12:4/0/terrain = 1
12:4/0/terrains_peering_bit/left_side = 1
12:4/0/terrains_peering_bit/top_left_corner = 1
12:4/0/terrains_peering_bit/top_side = 1
13:4/next_alternative_id = 2
13:4/0 = 0
13:4/0/terrain_set = 0
13:4/0/terrain = 2
13:4/0/terrains_peering_bit/bottom_side = 2
13:4/0/terrains_peering_bit/left_side = 1
13:4/0/terrains_peering_bit/top_side = 2
10:5/next_alternative_id = 2
10:5/0 = 0
10:5/0/terrain_set = 0
10:5/0/terrain = 2
10:5/0/terrains_peering_bit/right_side = 2
10:5/0/terrains_peering_bit/left_side = 2
10:5/0/terrains_peering_bit/top_side = 1
11:5/0 = 0
11:5/0/terrain_set = 0
11:5/0/terrain = 2
11:5/0/terrains_peering_bit/right_side = 2
11:5/0/terrains_peering_bit/left_side = 2
11:5/0/terrains_peering_bit/top_side = 1
12:5/next_alternative_id = 2
12:5/0 = 0
12:5/0/terrain_set = 0
12:5/0/terrain = 2
12:5/0/terrains_peering_bit/right_side = 2
12:5/0/terrains_peering_bit/left_side = 2
12:5/0/terrains_peering_bit/top_side = 1
13:5/0 = 0
13:5/0/terrain_set = 0
13:5/0/terrain = 2
13:5/0/terrains_peering_bit/left_side = 2
13:5/0/terrains_peering_bit/top_left_corner = 1
13:5/0/terrains_peering_bit/top_side = 2
9:5/0 = 0
9:5/0/terrain_set = 0
9:5/0/terrain = 2
9:5/0/terrains_peering_bit/right_side = 2
9:5/0/terrains_peering_bit/bottom_left_corner = 1
9:5/0/terrains_peering_bit/top_side = 2
8:5/0 = 0
8:5/0/terrain_set = 0
8:5/0/terrain = 2
8:5/0/terrains_peering_bit/bottom_right_corner = 1
8:5/0/terrains_peering_bit/left_side = 2
8:5/0/terrains_peering_bit/top_side = 2
8:6/0 = 0
8:6/0/terrain_set = 0
8:6/0/terrain = 2
8:6/0/terrains_peering_bit/bottom_side = 2
8:6/0/terrains_peering_bit/left_side = 2
8:6/0/terrains_peering_bit/top_right_corner = 1
9:6/0 = 0
9:6/0/terrain_set = 0
9:6/0/terrain = 2
9:6/0/terrains_peering_bit/right_side = 2
9:6/0/terrains_peering_bit/bottom_side = 2
9:6/0/terrains_peering_bit/top_left_corner = 1
10:6/0 = 0
10:6/0/terrain_set = 0
10:6/0/terrain = 1
10:6/0/terrains_peering_bit/right_side = 1
10:6/0/terrains_peering_bit/bottom_side = 1
10:6/0/terrains_peering_bit/bottom_left_corner = 1
10:6/0/terrains_peering_bit/left_side = 1
10:6/0/terrains_peering_bit/top_left_corner = 1
10:6/0/terrains_peering_bit/top_side = 1
10:6/0/terrains_peering_bit/top_right_corner = 1
10:7/0 = 0
10:7/0/terrain_set = 0
10:7/0/terrain = 1
10:7/0/terrains_peering_bit/right_side = 1
10:7/0/terrains_peering_bit/bottom_right_corner = 1
10:7/0/terrains_peering_bit/bottom_side = 1
10:7/0/terrains_peering_bit/bottom_left_corner = 1
10:7/0/terrains_peering_bit/left_side = 1
10:7/0/terrains_peering_bit/top_left_corner = 1
10:7/0/terrains_peering_bit/top_side = 1
11:7/0 = 0
11:7/0/terrain_set = 0
11:7/0/terrain = 1
11:7/0/terrains_peering_bit/right_side = 1
11:7/0/terrains_peering_bit/bottom_right_corner = 1
11:7/0/terrains_peering_bit/bottom_side = 1
11:7/0/terrains_peering_bit/bottom_left_corner = 1
11:7/0/terrains_peering_bit/left_side = 1
11:7/0/terrains_peering_bit/top_side = 1
11:7/0/terrains_peering_bit/top_right_corner = 1
12:7/0 = 0
12:7/0/terrain_set = 0
12:6/0 = 0
12:6/0/terrain_set = 0
11:6/0 = 0
11:6/0/terrain_set = 0
11:6/0/terrain = 1
11:6/0/terrains_peering_bit/right_side = 1
11:6/0/terrains_peering_bit/bottom_right_corner = 1
11:6/0/terrains_peering_bit/bottom_side = 1
11:6/0/terrains_peering_bit/left_side = 1
11:6/0/terrains_peering_bit/top_left_corner = 1
11:6/0/terrains_peering_bit/top_side = 1
11:6/0/terrains_peering_bit/top_right_corner = 1
13:6/0 = 0
13:6/0/terrain_set = 0
14:6/0 = 0
14:6/0/terrain_set = 0
14:7/0 = 0
14:7/0/terrain_set = 0
13:7/0 = 0
13:7/0/terrain_set = 0
15:6/0 = 0
15:6/0/terrain_set = 0
15:7/0 = 0
15:7/0/terrain_set = 0
14:5/0 = 0
14:5/0/terrain_set = 0
14:5/0/terrain = 2
14:5/0/terrains_peering_bit/right_side = 2
14:5/0/terrains_peering_bit/top_side = 2
14:5/0/terrains_peering_bit/top_right_corner = 1
14:4/0 = 0
14:4/0/terrain_set = 0
14:3/0 = 0
14:3/0/terrain_set = 0
14:2/0 = 0
14:2/0/terrain_set = 0
14:1/0 = 0
14:1/0/terrain_set = 0
14:0/0 = 0
15:1/0 = 0
15:1/0/terrain_set = 0
15:2/0 = 0
15:2/0/terrain_set = 0
15:3/0 = 0
15:3/0/terrain_set = 0
15:4/0 = 0
15:4/0/terrain_set = 0
15:5/0 = 0
15:5/0/terrain_set = 0
15:0/0 = 0
13:0/0 = 0
12:0/0 = 0
[resource]
tile_size = Vector2i(32, 32)
@@ -449,4 +722,12 @@ physics_layer_0/collision_layer = 1
terrain_set_0/mode = 0
terrain_set_0/terrain_0/name = "Brick"
terrain_set_0/terrain_0/color = Color(0.5, 0.34375, 0.25, 1)
terrain_set_0/terrain_1/name = "Forested"
terrain_set_0/terrain_1/color = Color(0.48, 0.2712, 0.062399995, 1)
terrain_set_0/terrain_2/name = "Grass"
terrain_set_0/terrain_2/color = Color(0.5769167, 0.86, 0.18059999, 1)
terrain_set_0/terrain_3/name = "Forested-Grass Junction"
terrain_set_0/terrain_3/color = Color(0.255, 0.51, 0.39525005, 1)
terrain_set_0/terrain_4/name = "Terminato Junction"
terrain_set_0/terrain_4/color = Color(0.25, 0.3416667, 0.5, 1)
sources/0 = SubResource("TileSetAtlasSource_blkrv")
+26 -12
View File
@@ -4,6 +4,12 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
public enum JumpKind {
Ground,
Turnback,
Midair
}
public partial class PlayerPhysicsController : CharacterBody2D {
// [Export]
// public float RunMultiplier { get; set; } = 1.84f;
@@ -11,6 +17,10 @@ public partial class PlayerPhysicsController : CharacterBody2D {
[Signal]
public delegate void OnTurnbackJumpEventHandler(bool onJumpPoint, bool isOnWall);
[Signal]
public delegate void OnJumpEventHandler(JumpKind kind, bool isOnGround, bool isOnWall);
[ExportCategory("Accelerations and Impulses")]
[Export]
public float WalkAcceleration { get; set; } = 3f;
@@ -35,10 +45,6 @@ public partial class PlayerPhysicsController : CharacterBody2D {
private float MaxRunSpeed { get; set; } = 16f;
[Export]
private float MaxWalkSpeed { get; set; } = 8f;
[Export]
private float MaxAirSpeed { get; set; } = 16f;
[Export]
private float MaxDoubleJumpFallSpeed { get; set; } = 1f;
[ExportCategory("Objects")]
[Export]
@@ -69,7 +75,7 @@ public partial class PlayerPhysicsController : CharacterBody2D {
[Export]
public float Deadzone { get; set; } = 0.1f;
public float GetMinAccel(float delta) => CancellationAcceleration * delta;
private float _lv = 0.0f;
@@ -129,6 +135,8 @@ public partial class PlayerPhysicsController : CharacterBody2D {
float velx = (Velocity.X / UnitToPx);
float vely = (Velocity.Y / UnitToPx) + Gravity * (float)delta;
if (Mathf.Abs(velx) < 0.1) velx = 0;
var grounded = this.IsOnFloor();
var coyoteGrounded = _timeOffGround < CoyoteTiming;
if (grounded || coyoteGrounded) {
@@ -136,6 +144,7 @@ public partial class PlayerPhysicsController : CharacterBody2D {
else _timeOffGround += (float)delta;
if (Input.IsActionJustPressed("jump")) {
EmitSignal(SignalName.OnJump, (int)JumpKind.Ground, this.IsOnFloor(), this.IsOnWall());
vely = -_lv;
}
@@ -151,10 +160,11 @@ public partial class PlayerPhysicsController : CharacterBody2D {
vely *= 1/4f;
}
if (Input.IsActionJustPressed("turn_back") && vely > 0) {
if (Input.IsActionJustPressed("turn_back") && vely > 0 && velx != 0) {
var side = velx > 0 ? PredictiveCollisions.Location.BottomRight : PredictiveCollisions.Location.BottomLeft;
if (Predictor.AnyHit(side) && !this.IsOnWall()) {
EmitSignal(SignalName.OnTurnbackJump, true, this.IsOnWall());
EmitSignal(SignalName.OnJump, (int)JumpKind.Turnback, this.IsOnFloor(), this.IsOnWall());
var hits = Predictor.GetLastCastHits(side);
_ = hits.First(x => {
if (x.Obj is null) return false;
@@ -195,7 +205,8 @@ public partial class PlayerPhysicsController : CharacterBody2D {
}
}
if (Input.IsActionJustPressed("jump") && Mathf.Abs(vely) < MaxDoubleJumpFallSpeed) {
if (Input.IsActionJustPressed("jump") && Mathf.Abs(vely) < 2) {
EmitSignal(SignalName.OnJump, (int)JumpKind.Midair, this.IsOnFloor(), this.IsOnWall());
vely = -_lv;
}
@@ -208,13 +219,16 @@ public partial class PlayerPhysicsController : CharacterBody2D {
else velx += autostop;
}
var maxXSpeed = grounded ? Input.IsActionPressed("run") ? MaxRunSpeed : MaxWalkSpeed : MaxAirSpeed;
var maxXSpeed = Input.IsActionPressed("run") ? MaxRunSpeed : MaxWalkSpeed;
var maxYSpeed = vely > 0 ? MaxFallSpeed : MaxRiseSpeed;
var (absvelx, absvely) = (Mathf.Abs(velx), Mathf.Abs(vely));
if (absvelx > maxXSpeed)
velx = Mathf.Sign(velx) * Mathf.Max(absvelx - CancellationAcceleration * (float)delta, maxXSpeed);
if (absvely > maxYSpeed)
vely = Mathf.Sign(vely) * Mathf.Max(absvely - CancellationAcceleration * (float)delta, maxYSpeed);
float xcancel = 0, ycancel = 0;
if (absvelx > maxXSpeed) xcancel = -Math.Sign(velx) * CancellationAcceleration * (float)delta;
if (absvely > maxYSpeed) ycancel = -Math.Sign(vely) * CancellationAcceleration * (float)delta;
if (Mathf.Abs(xcancel) + 0.1 > absvelx) velx = 0;
else velx += xcancel;
if (Mathf.Abs(ycancel) + 0.1 > absvely) vely = 0;
else vely += ycancel;
DebugTextLabel.Text =
$"grounded: {grounded}\n" +
+26
View File
@@ -0,0 +1,26 @@
extends AudioStreamPlayer
@export var ground_jump: Array[AudioStream];
@export var midair_jump: Array[AudioStream];
@export var turnback_jump: Array[AudioStream];
enum JumpKind {
Ground = 0,
Turnback = 1,
Midair = 2
}
func _on_character_body_2d_on_jump(kind: JumpKind, isOnGround: bool, isOnWall: bool):
match kind:
JumpKind.Ground:
playSfx(ground_jump)
JumpKind.Turnback:
playSfx(turnback_jump)
JumpKind.Midair:
playSfx(midair_jump)
pass # Replace with function body.
func playSfx(sfx: Array[AudioStream]):
stream = sfx[randi_range(0, sfx.size() - 1)]
play()
+1
View File
@@ -0,0 +1 @@
uid://bwgqvwybyrsmq
-1
View File
@@ -3,7 +3,6 @@ using System;
using System.Collections.Generic;
#nullable enable
public class LevelPattern {
public TileMapPattern Level { get; }