From 96a3dd44e3afdb9aa42a52ad1b119db4905d6da6 Mon Sep 17 00:00:00 2001 From: debugman18 Date: Sat, 17 Oct 2026 21:03:13 -0500 Subject: [PATCH] Test --- art/player/crouch/frame3.png | Bin 0 -> 461 bytes art/player/crouch/frame3.png.import | 43 ++++++++++++++++++++++++++++ background_music.gd | 11 +++++++ background_music.gd.uid | 1 + hidden_vertical_long_block.gd | 9 ++++++ hidden_vertical_long_block.gd.uid | 1 + hidden_vertical_long_block.tscn | 31 ++++++++++++++++++++ player_2d.gd | 7 +++-- player_2d.tscn | 16 +++++++---- vertical_long_block.gd | 5 +--- vertical_long_block.tscn | 1 - 11 files changed, 112 insertions(+), 13 deletions(-) create mode 100644 art/player/crouch/frame3.png create mode 100644 art/player/crouch/frame3.png.import create mode 100644 background_music.gd create mode 100644 background_music.gd.uid create mode 100644 hidden_vertical_long_block.gd create mode 100644 hidden_vertical_long_block.gd.uid create mode 100644 hidden_vertical_long_block.tscn diff --git a/art/player/crouch/frame3.png b/art/player/crouch/frame3.png new file mode 100644 index 0000000000000000000000000000000000000000..4dea64aea4b23841ec966c95cf31f3157759b0c8 GIT binary patch literal 461 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G|^0G|+7AiaHQ_loIt4h|08>$U^Av${5v11YwWAiv=MAi%JB|C0Sc5zYdS z$YKTtJ|LTKKcfX}unJI6vcxr_Bsf2%FBlnrve1|u_AoC(M_WMpCx1kzDJoY~F-7S92) zL7=yck>Lfa#+N-d0hykjE{-7@!KHl{xfm2Un5RGc|G&s*ZNRGq?XuAv*$Y@j zCT?=$ib*o#bN6`E)T;YMxr9TZ=6xGuu2F13NQ?M3g;hO2+4K7jpB3ACgz3)o#3Ro^ O7I?b)xvX void: + #AudioServer. + pass + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass diff --git a/background_music.gd.uid b/background_music.gd.uid new file mode 100644 index 0000000..07820cd --- /dev/null +++ b/background_music.gd.uid @@ -0,0 +1 @@ +uid://544kxhmunfcp diff --git a/hidden_vertical_long_block.gd b/hidden_vertical_long_block.gd new file mode 100644 index 0000000..08f97a3 --- /dev/null +++ b/hidden_vertical_long_block.gd @@ -0,0 +1,9 @@ +extends RigidBody2D + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + add_to_group("Hidden") + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass diff --git a/hidden_vertical_long_block.gd.uid b/hidden_vertical_long_block.gd.uid new file mode 100644 index 0000000..dec09a0 --- /dev/null +++ b/hidden_vertical_long_block.gd.uid @@ -0,0 +1 @@ +uid://dcesonmhay5vo diff --git a/hidden_vertical_long_block.tscn b/hidden_vertical_long_block.tscn new file mode 100644 index 0000000..eae37d8 --- /dev/null +++ b/hidden_vertical_long_block.tscn @@ -0,0 +1,31 @@ +[gd_scene format=3 uid="uid://b5ssjxl1l3fx0"] + +[ext_resource type="Script" uid="uid://dcesonmhay5vo" path="res://hidden_vertical_long_block.gd" id="1_tmhet"] +[ext_resource type="PackedScene" uid="uid://ckqable762x8v" path="res://block.tscn" id="2_667v4"] + +[node name="HiddenVerticalLongBlock" type="RigidBody2D" unique_id=925152188] +visible = false +rotation = 1.5707964 +gravity_scale = 0.0 +freeze = true +script = ExtResource("1_tmhet") + +[node name="Block" parent="." unique_id=1409784601 instance=ExtResource("2_667v4")] + +[node name="Block2" parent="." unique_id=54235726 instance=ExtResource("2_667v4")] +position = Vector2(15.999999, -9.536743e-07) + +[node name="Block3" parent="." unique_id=474997430 instance=ExtResource("2_667v4")] +position = Vector2(-15, 0) + +[node name="Block4" parent="." unique_id=1125897933 instance=ExtResource("2_667v4")] +position = Vector2(32, -1.9073486e-06) + +[node name="Block5" parent="." unique_id=1104682129 instance=ExtResource("2_667v4")] +position = Vector2(-31, 0) + +[node name="Block6" parent="." unique_id=200247655 instance=ExtResource("2_667v4")] +position = Vector2(48, -1.9073486e-06) + +[node name="Block7" parent="." unique_id=519163182 instance=ExtResource("2_667v4")] +position = Vector2(-47, 3.8146973e-06) diff --git a/player_2d.gd b/player_2d.gd index 6f29764..39d2b99 100644 --- a/player_2d.gd +++ b/player_2d.gd @@ -7,6 +7,7 @@ const FRICTION = 100 const GRAVITY_MULT = 0.8 const JUMP_VELOCITY = -410.0 const DASH_LENGTH = 0.2 +const BACKGROUND_COLOR = Color.SANDY_BROWN var fall_timer = 0.0 var teleport_cooldown = 0 @@ -42,13 +43,13 @@ func on_teleport(): await get_tree().create_timer(1).timeout teleport_cooldown = 0 -func spawn_ghost(position): +func spawn_ghost(ghost_position): var ghost = preload("res://ghost.tscn") ghost = ghost.instantiate() get_parent().add_child(ghost) print(ghost) print(ghost.position) - ghost.position = position + ghost.position = ghost_position func on_death(instant = false, player_position = position): if !instant: @@ -127,7 +128,7 @@ func _process(delta: float) -> void: velocity.x = move_toward(velocity.x, 0, FRICTION) $Sprite2D.play("idle") $Sprite2D/HatSprite.play("idle") - $Parallax2D/Sprite2D.modulate = Color.CORAL + $Parallax2D/Sprite2D.modulate = BACKGROUND_COLOR for hidden_object in get_tree().get_nodes_in_group("Hidden"): hidden_object.hide() diff --git a/player_2d.tscn b/player_2d.tscn index b361009..d2404b2 100644 --- a/player_2d.tscn +++ b/player_2d.tscn @@ -3,6 +3,7 @@ [ext_resource type="Script" uid="uid://cojhnj15psd2x" path="res://player_2d.gd" id="1_sy00s"] [ext_resource type="Shader" uid="uid://mmf86jusrkrr" path="res://shaders/warp_shader.gdshader" id="3_gt2ls"] [ext_resource type="Texture2D" uid="uid://dpdxs6gjmexgh" path="res://art/background.png" id="3_p3026"] +[ext_resource type="Script" uid="uid://544kxhmunfcp" path="res://background_music.gd" id="3_sxtm6"] [ext_resource type="Texture2D" uid="uid://biv3f67rqumak" path="res://art/level_start.png" id="4_nj6as"] [ext_resource type="Script" uid="uid://3bqq3mfbby2c" path="res://warp_shader.gd" id="4_pmt5n"] [ext_resource type="Texture2D" uid="uid://ddhhtwgtowokp" path="res://art/player/crouch/frame1.png" id="6_3prq1"] @@ -15,6 +16,7 @@ [ext_resource type="Texture2D" uid="uid://du5i0tg6u1lal" path="res://art/player/crystal3.png" id="8_ukfft"] [ext_resource type="Texture2D" uid="uid://lmje8plw76e1" path="res://art/player/idle/frame2.png" id="9_lu0ka"] [ext_resource type="Texture2D" uid="uid://bko8dvawpul3c" path="res://art/player/crystal4.png" id="9_ur4nw"] +[ext_resource type="Texture2D" uid="uid://m5djssna67e1" path="res://art/player/crouch/frame3.png" id="9_w0gjo"] [ext_resource type="Texture2D" uid="uid://ba4kjeulthw1g" path="res://art/hats/dunce1.png" id="10_5s8kx"] [ext_resource type="Texture2D" uid="uid://cn31x2l44je2t" path="res://art/dash_glow.png" id="10_ur4nw"] [ext_resource type="Texture2D" uid="uid://biscdhn8jh8ha" path="res://art/jump_glow.png" id="11_3lee2"] @@ -43,6 +45,9 @@ animations = [{ }, { "duration": 1.0, "texture": ExtResource("7_lu0ka") +}, { +"duration": 1.0, +"texture": ExtResource("9_w0gjo") }], "loop": 1, "name": &"crouch", @@ -125,6 +130,11 @@ size = Vector2(10, 16) [node name="Player2D" type="CharacterBody2D" unique_id=889851478] script = ExtResource("1_sy00s") +[node name="BackgroundMusic" type="AudioStreamPlayer2D" parent="." unique_id=299359239] +stream = ExtResource("12_5s8kx") +playback_type = 1 +script = ExtResource("3_sxtm6") + [node name="CanvasLayer2" type="CanvasLayer" parent="." unique_id=1854423107] [node name="WarpShader" type="MeshInstance2D" parent="CanvasLayer2" unique_id=88397728] @@ -158,7 +168,7 @@ position = Vector2(0, 2) sprite_frames = SubResource("SpriteFrames_fvyjh") animation = &"crouch" autoplay = "idle" -frame_progress = 0.44028828 +frame_progress = 0.030440537 [node name="HatSprite" type="AnimatedSprite2D" parent="Sprite2D" unique_id=1954184475] visible = false @@ -211,7 +221,3 @@ stream = ExtResource("20_1741q") [node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1294571021] shape = SubResource("RectangleShape2D_fj7yv") - -[node name="BackgroundMusic" type="AudioStreamPlayer2D" parent="." unique_id=2123463449] -stream = ExtResource("12_5s8kx") -volume_db = -5.0 diff --git a/vertical_long_block.gd b/vertical_long_block.gd index 5a04c4e..d6d49b1 100644 --- a/vertical_long_block.gd +++ b/vertical_long_block.gd @@ -1,11 +1,8 @@ extends RigidBody2D - # Called when the node enters the scene tree for the first time. func _ready() -> void: - add_to_group("Hidden") - #pass # Replace with function body. - + pass # Replace with function body. # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: diff --git a/vertical_long_block.tscn b/vertical_long_block.tscn index 1ba2c3a..037c36b 100644 --- a/vertical_long_block.tscn +++ b/vertical_long_block.tscn @@ -4,7 +4,6 @@ [ext_resource type="PackedScene" uid="uid://ckqable762x8v" path="res://block.tscn" id="1_noju1"] [node name="VerticalLongBlock" type="RigidBody2D" unique_id=925152188] -visible = false rotation = 1.5707964 gravity_scale = 0.0 freeze = true