changed the way the fall sprite works

This commit is contained in:
pennyrigate 2023-06-20 08:20:35 -04:00
parent 67e9a93b2b
commit 929b63c454
10 changed files with 179 additions and 42 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 2 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/sg_jump_ladder.png-47f6c448f8443f8066f4d7e915150ff9.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://graphics/player/sg_jump_ladder.png"
dest_files=[ "res://.import/sg_jump_ladder.png-47f6c448f8443f8066f4d7e915150ff9.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=31 format=2]
[gd_scene load_steps=30 format=2]
[ext_resource path="res://maps/map.gd" type="Script" id=1]
[ext_resource path="res://objects/hud/hud.tscn" type="PackedScene" id=2]
@ -11,8 +11,6 @@
[ext_resource path="res://objects/environment/ladder/ladder.tscn" type="PackedScene" id=9]
[ext_resource path="res://tilesets/t_abyss.tres" type="TileSet" id=10]
[ext_resource path="res://objects/enemy/mine.tscn" type="PackedScene" id=11]
[ext_resource path="res://scripts/random_spawner.gd" type="Script" id=12]
[ext_resource path="res://objects/environment/bubble/bubble.tscn" type="PackedScene" id=13]
[ext_resource path="res://objects/enemy/squig.tscn" type="PackedScene" id=14]
[ext_resource path="res://tilesets/t_death.tres" type="TileSet" id=15]
[ext_resource path="res://objects/enemy/turtle.tscn" type="PackedScene" id=16]
@ -23,6 +21,7 @@
[ext_resource path="res://objects/collectibles/key.tscn" type="PackedScene" id=21]
[ext_resource path="res://objects/collectibles/shard.tscn" type="PackedScene" id=22]
[ext_resource path="res://objects/environment/rock/rock.tscn" type="PackedScene" id=23]
[ext_resource path="res://objects/environment/bubble/bubble_spawner.tscn" type="PackedScene" id=24]
[sub_resource type="CanvasItemMaterial" id=12]
blend_mode = 3
@ -146,7 +145,7 @@ z_index = -30
tile_set = ExtResource( 10 )
cell_size = Vector2( 8, 8 )
format = 1
tile_data = PoolIntArray( 327680, 0, 196609, 327681, 0, 196610, 327682, 0, 196610, 327683, 0, 196610, 327684, 0, 196610, 327685, 0, 196610, 327686, 0, 196611, 327704, 0, 1, 327705, 0, 196610, 327706, 0, 196610, 327707, 0, 196610, 327708, 0, 3, 327711, 0, 0, 393240, 0, 65536, 393244, 0, 65536, 393247, 0, 65536, 458776, 0, 65536, 458780, 0, 65536, 458783, 0, 65536, 524303, 0, 196609, 524304, 0, 196610, 524305, 0, 196610, 524306, 0, 196610, 524307, 0, 196610, 524308, 0, 196610, 524309, 0, 196610, 524310, 0, 196610, 524311, 0, 196610, 524312, 0, 131075, 524316, 0, 65536, 524319, 0, 65536, 589830, 0, 196609, 589831, 0, 196610, 589832, 0, 196610, 589833, 0, 196610, 589834, 0, 196610, 589835, 0, 196610, 589836, 0, 3, 589852, 0, 65536, 589855, 0, 65536, 655363, 0, 196608, 655372, 0, 65536, 655388, 0, 65536, 655391, 0, 65536, 720908, 0, 131073, 720909, 0, 3, 720924, 0, 65536, 720927, 0, 65536, 786445, 0, 131073, 786446, 0, 3, 786456, 0, 196608, 786460, 0, 65536, 786463, 0, 65536, 851982, 0, 131073, 851983, 0, 3, 851986, 0, 196609, 851987, 0, 196610, 851988, 0, 196610, 851989, 0, 196611, 851996, 0, 65536, 851999, 0, 65536, 917506, 0, 196609, 917507, 0, 196610, 917508, 0, 196610, 917509, 0, 3, 917519, 0, 65536, 917532, 0, 65536, 917535, 0, 65536, 983045, 0, 65536, 983055, 0, 65537, 983056, 0, 196610, 983057, 0, 196610, 983058, 0, 196610, 983059, 0, 196610, 983060, 0, 196610, 983061, 0, 196610, 983062, 0, 196610, 983063, 0, 196610, 983064, 0, 196610, 983065, 0, 196611, 983068, 0, 131072, 983071, 0, 131072, 1048581, 0, 65536, 1048591, 0, 65536, 1114117, 0, 65536, 1114127, 0, 65536, 1179653, 0, 131073, 1179654, 0, 196610, 1179655, 0, 196610, 1179656, 0, 196610, 1179657, 0, 196610, 1179658, 0, 196610, 1179659, 0, 196610, 1179660, 0, 196611, 1179663, 0, 65536, 1245199, 0, 65536, 1310735, 0, 65536, 1310737, 0, 196609, 1310738, 0, 196610, 1310739, 0, 196610, 1310740, 0, 196611, 1376258, 0, 196609, 1376259, 0, 196610, 1376260, 0, 196610, 1376261, 0, 196610, 1376262, 0, 196610, 1376263, 0, 196610, 1376264, 0, 196610, 1376265, 0, 196610, 1376266, 0, 196610, 1376267, 0, 196610, 1376268, 0, 196610, 1376269, 0, 196610, 1376270, 0, 196610, 1376271, 0, 65539, 1441807, 0, 65536, 1507343, 0, 131073, 1507344, 0, 196610, 1507345, 0, 196610, 1507346, 0, 196610, 1507347, 0, 196610, 1507348, 0, 196610, 1507349, 0, 196610, 1507350, 0, 196610, 1507351, 0, 196610, 1507352, 0, 196610, 1507353, 0, 196610, 1507354, 0, 196610, 1507355, 0, 196611, 1835008, 0, 196609, 1835009, 0, 196610, 1835010, 0, 196610, 1835011, 0, 196610, 1835012, 0, 196610, 1835013, 0, 196610, 1835014, 0, 196610, 1835015, 0, 196610, 1835016, 0, 196610, 1835017, 0, 196610, 1835018, 0, 196610, 1835019, 0, 196610, 1835020, 0, 196610, 1835021, 0, 196610, 1835022, 0, 3, 1835031, 0, 1, 1835032, 0, 196610, 1835033, 0, 196611, 1835035, 0, 196609, 1835036, 0, 196610, 1835037, 0, 196610, 1835038, 0, 196610, 1835039, 0, 196611, 1900558, 0, 131073, 1900559, 0, 3, 1900566, 0, 1, 1900567, 0, 131075, 1966095, 0, 131073, 1966096, 0, 196611, 1966100, 0, 1, 1966101, 0, 196610, 1966102, 0, 131075, 2031636, 0, 65536, 2097172, 0, 131072, 2162702, 0, 1, 2162703, 0, 196610, 2162704, 0, 196610, 2162705, 0, 196611, 2162717, 0, 1, 2162718, 0, 196610, 2162719, 0, 196611, 2228238, 0, 65536, 2228250, 0, 196608, 2228253, 0, 65536, 2293764, 0, 196609, 2293765, 0, 196610, 2293766, 0, 196610, 2293767, 0, 196610, 2293768, 0, 196610, 2293769, 0, 196610, 2293770, 0, 196610, 2293771, 0, 196610, 2293772, 0, 196610, 2293773, 0, 196610, 2293774, 0, 131075, 2293789, 0, 65536, 2359296, 0, 196609, 2359297, 0, 196611, 2359319, 0, 196609, 2359320, 0, 196610, 2359321, 0, 196610, 2359322, 0, 196611, 2359325, 0, 131072, 2424852, 0, 196609, 2424853, 0, 196611 )
tile_data = PoolIntArray( 327680, 0, 196609, 327681, 0, 196610, 327682, 0, 196610, 327683, 0, 196610, 327684, 0, 196610, 327685, 0, 196610, 327686, 0, 196611, 327704, 0, 1, 327705, 0, 196610, 327706, 0, 196610, 327707, 0, 196610, 327708, 0, 3, 327711, 0, 0, 393240, 0, 65536, 393244, 0, 65536, 393247, 0, 65536, 458776, 0, 65536, 458780, 0, 65536, 458783, 0, 65536, 524303, 0, 196609, 524304, 0, 196610, 524305, 0, 196610, 524306, 0, 196610, 524307, 0, 196610, 524308, 0, 196610, 524309, 0, 196610, 524310, 0, 196610, 524311, 0, 196610, 524312, 0, 131075, 524316, 0, 65536, 524319, 0, 65536, 589830, 0, 196609, 589831, 0, 196610, 589832, 0, 196610, 589833, 0, 196610, 589834, 0, 196610, 589835, 0, 196610, 589836, 0, 3, 589852, 0, 65536, 589855, 0, 65536, 655363, 0, 196608, 655372, 0, 65536, 655388, 0, 65536, 655391, 0, 65536, 720908, 0, 131073, 720909, 0, 3, 720924, 0, 65536, 720927, 0, 65536, 786445, 0, 131073, 786446, 0, 3, 786456, 0, 196608, 786460, 0, 65536, 786463, 0, 65536, 851982, 0, 131073, 851983, 0, 3, 851986, 0, 196609, 851987, 0, 196610, 851988, 0, 196610, 851989, 0, 196611, 851996, 0, 65536, 851999, 0, 65536, 917506, 0, 196609, 917507, 0, 196610, 917508, 0, 196610, 917509, 0, 3, 917519, 0, 65536, 917532, 0, 65536, 917535, 0, 65536, 983045, 0, 65536, 983055, 0, 131073, 983056, 0, 196610, 983057, 0, 196610, 983058, 0, 196610, 983059, 0, 2, 983060, 0, 196610, 983061, 0, 196610, 983062, 0, 196610, 983063, 0, 196610, 983064, 0, 196610, 983065, 0, 196611, 983068, 0, 131072, 983071, 0, 131072, 1048581, 0, 65536, 1048588, 0, 1, 1048589, 0, 196611, 1048595, 0, 65536, 1114117, 0, 65536, 1114124, 0, 65536, 1114131, 0, 131072, 1179653, 0, 131073, 1179654, 0, 196610, 1179655, 0, 196610, 1179656, 0, 196610, 1179657, 0, 196610, 1179658, 0, 196610, 1179659, 0, 196610, 1179660, 0, 131075, 1310734, 0, 1, 1310735, 0, 196610, 1310736, 0, 196611, 1310739, 0, 196609, 1310740, 0, 196610, 1310741, 0, 196611, 1376258, 0, 196609, 1376259, 0, 196610, 1376260, 0, 196610, 1376261, 0, 3, 1376270, 0, 65536, 1441797, 0, 131073, 1441798, 0, 196610, 1441799, 0, 196610, 1441800, 0, 196611, 1441803, 0, 196609, 1441804, 0, 196610, 1441805, 0, 196610, 1441806, 0, 65539, 1507342, 0, 131073, 1507343, 0, 196610, 1507344, 0, 196610, 1507345, 0, 196610, 1507346, 0, 196610, 1507347, 0, 196610, 1507348, 0, 196610, 1507349, 0, 196610, 1507350, 0, 196610, 1507351, 0, 196610, 1507352, 0, 196610, 1507353, 0, 196610, 1507354, 0, 196610, 1507355, 0, 196611, 1835008, 0, 196609, 1835009, 0, 196610, 1835010, 0, 196610, 1835011, 0, 196610, 1835012, 0, 196610, 1835013, 0, 196610, 1835014, 0, 196610, 1835015, 0, 196610, 1835016, 0, 196610, 1835017, 0, 196610, 1835018, 0, 196610, 1835019, 0, 196610, 1835020, 0, 196610, 1835021, 0, 196610, 1835022, 0, 3, 1835031, 0, 1, 1835032, 0, 196610, 1835033, 0, 196611, 1835035, 0, 196609, 1835036, 0, 196610, 1835037, 0, 196610, 1835038, 0, 196610, 1835039, 0, 196611, 1900558, 0, 131073, 1900559, 0, 3, 1900566, 0, 1, 1900567, 0, 131075, 1966095, 0, 131073, 1966096, 0, 196611, 1966100, 0, 1, 1966101, 0, 196610, 1966102, 0, 131075, 2031636, 0, 65536, 2097172, 0, 131072, 2162702, 0, 1, 2162703, 0, 196610, 2162704, 0, 196610, 2162705, 0, 196611, 2162717, 0, 1, 2162718, 0, 196610, 2162719, 0, 196611, 2228238, 0, 65536, 2228250, 0, 196608, 2228253, 0, 65536, 2293764, 0, 196609, 2293765, 0, 196610, 2293766, 0, 196610, 2293767, 0, 196610, 2293768, 0, 196610, 2293769, 0, 196610, 2293770, 0, 196610, 2293771, 0, 196610, 2293772, 0, 196610, 2293773, 0, 196610, 2293774, 0, 131075, 2293789, 0, 65536, 2359296, 0, 196609, 2359297, 0, 196611, 2359319, 0, 196609, 2359320, 0, 196610, 2359321, 0, 196610, 2359322, 0, 196611, 2359325, 0, 131072, 2424852, 0, 196609, 2424853, 0, 196611 )
[node name="Ladders" type="TileMap" parent="Tilemaps"]
z_index = 10
@ -160,7 +159,7 @@ tile_set = ExtResource( 15 )
cell_size = Vector2( 8, 8 )
collision_layer = 32
format = 1
tile_data = PoolIntArray( 458768, 1, 0, 458769, 1, 0, 458770, 1, 0, 458771, 1, 0, 458772, 1, 0, 458773, 1, 0, 458774, 1, 0, 458775, 1, 0, 786452, 1, 0, 917520, 1, 0, 917521, 1, 0, 917522, 1, 0, 917523, 1, 0, 917524, 1, 0, 917525, 1, 0, 917526, 1, 0, 917527, 1, 0, 917528, 1, 0, 917529, 1, 0, 1114121, 1, 0, 1441808, 1, 0, 1441809, 1, 0, 1441810, 1, 0, 1441811, 1, 0, 1441812, 1, 0, 1441813, 1, 0, 1441814, 1, 0, 1441815, 1, 0, 1441816, 1, 0, 1441817, 1, 0, 1441818, 1, 0, 1441819, 1, 0, 2228228, 1, 0, 2228229, 1, 0, 2228230, 1, 0, 2228231, 1, 0, 2228232, 1, 0, 2228233, 1, 0, 2228234, 1, 0, 2228235, 1, 0, 2228236, 1, 0, 2228237, 1, 0 )
tile_data = PoolIntArray( 458768, 1, 0, 458769, 1, 0, 458770, 1, 0, 458771, 1, 0, 458772, 1, 0, 458773, 1, 0, 458774, 1, 0, 458775, 1, 0, 786452, 1, 0, 917520, 1, 0, 917521, 1, 0, 917522, 1, 0, 917523, 1, 0, 917524, 1, 0, 917525, 1, 0, 917526, 1, 0, 917527, 1, 0, 917528, 1, 0, 917529, 1, 0, 1114121, 1, 0, 1441807, 1, 0, 1441808, 1, 0, 1441809, 1, 0, 1441810, 1, 0, 1441811, 1, 0, 1441812, 1, 0, 1441813, 1, 0, 1441814, 1, 0, 1441815, 1, 0, 1441816, 1, 0, 1441817, 1, 0, 1441818, 1, 0, 1441819, 1, 0, 2228228, 1, 0, 2228229, 1, 0, 2228230, 1, 0, 2228231, 1, 0, 2228232, 1, 0, 2228233, 1, 0, 2228234, 1, 0, 2228235, 1, 0, 2228236, 1, 0, 2228237, 1, 0 )
[node name="Ladders" type="Node2D" parent="."]
@ -187,7 +186,7 @@ position = Vector2( 184, 152 )
[node name="Squigs" type="Node2D" parent="Enemies"]
[node name="Squig" parent="Enemies/Squigs" instance=ExtResource( 14 )]
position = Vector2( 104, 176 )
position = Vector2( 136, 416 )
[node name="Squig2" parent="Enemies/Squigs" instance=ExtResource( 14 )]
position = Vector2( 200, 432 )
@ -198,8 +197,8 @@ position = Vector2( 88, 528 )
[node name="Turtle" parent="Enemies" instance=ExtResource( 16 )]
position = Vector2( 56, 40 )
right_down_boundary = 9.0
speed = 30
spike_delay = 4.0
speed = 50
spike_delay = 3.0
[node name="Turtle2" parent="Enemies" instance=ExtResource( 16 )]
position = Vector2( 88, 264 )
@ -210,7 +209,7 @@ spike_delay = 0.5
[node name="Eel" parent="Enemies" instance=ExtResource( 18 )]
position = Vector2( 152, 96 )
segments = 2
speed = 80.0
speed = 50.0
[node name="Path2D" parent="Enemies/Eel" index="0"]
curve = SubResource( 13 )
@ -230,6 +229,7 @@ rotation = -1.5708
[node name="Eel3" parent="Enemies" instance=ExtResource( 18 )]
position = Vector2( 40, 112 )
segments = 4
speed = 50.0
[node name="Path2D" parent="Enemies/Eel3" index="0"]
curve = SubResource( 15 )
@ -256,14 +256,17 @@ position = Vector2( 48, 32 )
[node name="Key3" parent="Collectibles" instance=ExtResource( 21 )]
position = Vector2( 32, 104 )
[node name="Key18" parent="Collectibles" instance=ExtResource( 21 )]
position = Vector2( 120, 152 )
[node name="Key15" parent="Collectibles" instance=ExtResource( 21 )]
position = Vector2( 24, 216 )
position = Vector2( 128, 232 )
[node name="Key16" parent="Collectibles" instance=ExtResource( 21 )]
position = Vector2( 64, 216 )
position = Vector2( 80, 216 )
[node name="Key17" parent="Collectibles" instance=ExtResource( 21 )]
position = Vector2( 104, 216 )
position = Vector2( 112, 216 )
[node name="Key5" parent="Collectibles" instance=ExtResource( 21 )]
position = Vector2( 80, 64 )
@ -299,7 +302,7 @@ position = Vector2( 56, 64 )
position = Vector2( 16, 104 )
[node name="Shard" parent="Collectibles" instance=ExtResource( 22 )]
position = Vector2( 148, 152 )
position = Vector2( 160, 152 )
[node name="Star3" parent="Collectibles" instance=ExtResource( 17 )]
position = Vector2( 240, 256 )
@ -326,31 +329,30 @@ left_up_boundary = 8.0
[node name="Rock" parent="Environment" instance=ExtResource( 23 )]
position = Vector2( 224, 216 )
[node name="Rock2" parent="Environment" instance=ExtResource( 23 )]
position = Vector2( 148, 152 )
[node name="Bubbles" type="Node2D" parent="."]
[node name="BubbleSpawner" type="Node2D" parent="Bubbles"]
position = Vector2( 16, 158 )
script = ExtResource( 12 )
scene = ExtResource( 13 )
extents = Rect2( 0, 0, 16, 8 )
[node name="BubbleSpawner" parent="Bubbles" instance=ExtResource( 24 )]
position = Vector2( 16, 160 )
extents = Rect2( 0, 0, 32, 8 )
[node name="BubbleSpawner4" type="Node2D" parent="Bubbles"]
position = Vector2( 8, 30 )
script = ExtResource( 12 )
scene = ExtResource( 13 )
extents = Rect2( 0, 0, 16, 8 )
[node name="BubbleSpawner3" parent="Bubbles" instance=ExtResource( 24 )]
position = Vector2( 192, 32 )
extents = Rect2( 0, 0, 40, 8 )
[node name="BubbleSpawner2" type="Node2D" parent="Bubbles"]
position = Vector2( 204, 30 )
script = ExtResource( 12 )
scene = ExtResource( 13 )
extents = Rect2( 0, 0, 16, 8 )
[node name="BubbleSpawner2" parent="Bubbles" instance=ExtResource( 24 )]
position = Vector2( 0, 32 )
extents = Rect2( 0, 0, 56, 8 )
[node name="BubbleSpawner3" type="Node2D" parent="Bubbles"]
position = Vector2( 236, 214 )
script = ExtResource( 12 )
scene = ExtResource( 13 )
extents = Rect2( 0, 0, 16, 8 )
[node name="BubbleSpawner4" parent="Bubbles" instance=ExtResource( 24 )]
position = Vector2( 48, 64 )
extents = Rect2( 0, 0, 56, 8 )
[node name="BubbleSpawner5" parent="Bubbles" instance=ExtResource( 24 )]
position = Vector2( 112, 152 )
extents = Rect2( 0, 0, 24, 8 )
[editable path="Enemies/Eel"]
[editable path="Enemies/Eel2"]

View file

@ -3,6 +3,7 @@ extends Area2D
export var speed = 16.0
onready var sprite = $Sprite
onready var activation_timer = $ActivationTimer
var lifetime = 0.0
@ -15,10 +16,16 @@ func _physics_process(delta):
sprite.position.x = sin(lifetime * 4.0) * 4.0
position.y -= speed * delta
func _on_Bubble_body_entered(body):
func pop():
sprite.frame_coords.y = 1
speed = 0.0
get_tree().create_timer(0.5, false).connect("timeout", self, "queue_free")
func _on_Bubble_body_entered(body):
if body.is_in_group("player"):
body.oxygen_timer.start()
Audio.play_sound(Audio.a_bubble,Audio.ac_die)
pop()
elif activation_timer.time_left == 0:
pop()

View file

@ -17,5 +17,11 @@ vframes = 2
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 1 )
[node name="ActivationTimer" type="Timer" parent="."]
autostart = true
__meta__ = {
"_editor_description_": "timer until the bubble can be broken by objects other than the player"
}
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
[connection signal="body_entered" from="." to="." method="_on_Bubble_body_entered"]

View file

@ -0,0 +1,11 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://objects/environment/bubble/bubble.tscn" type="PackedScene" id=1]
[ext_resource path="res://scripts/random_spawner.gd" type="Script" id=2]
[node name="BubbleSpawner" type="Node2D"]
position = Vector2( 16, 158 )
script = ExtResource( 2 )
scene = ExtResource( 1 )
extents = Rect2( 0, 0, 16, 8 )
delay = 3.0

View file

@ -34,8 +34,8 @@ func _ready():
tween.tween_interval(3.0)
tween.tween_property(music, "rect_position:x", 256.0, 1.0)
#Show oxygen meter when underwater
var player = get_tree().get_nodes_in_group("player").pop_back()
if player.underwater == true: oxygen.visible = true
# var player = get_tree().get_nodes_in_group("player").pop_back()
# if player.underwater == true: oxygen.visible = true
func shard_popup(shard_number):
#Change text to song name
@ -84,7 +84,7 @@ func _physics_process(delta):
time_counter.modulate = bonus_color
else:
time_counter.modulate = Color.white
#Oxygen meter
var player = get_tree().get_nodes_in_group("player").pop_back()
oxygen_meter.scale.x = player.oxygen_timer.time_left
# #Oxygen meter
# var player = get_tree().get_nodes_in_group("player").pop_back()
# oxygen_meter.scale.x = player.oxygen_timer.time_left
#if oxygen_meter.scale.x > 15: oxygen_meter.scale.x = 15

View file

@ -52,7 +52,7 @@ onready var ladder_detector: RayCast2D = $"%LadderDetector"
onready var death_splatter_position: Position2D = $"%DeathSplatterPosition"
onready var pushable_detector: RayCast2D = $"%PushableDetector"
onready var oxygen_timer = $OxygenTimer
onready var oxygen_origin = oxygen_timer.wait_time
onready var low_oxygen_label = $LowOxygenLabel
# OVERRIDES #
func _ready() -> void:
@ -100,6 +100,15 @@ func _physics_process(delta: float) -> void:
if ladder_detector.is_colliding():
state_chart.send_event("ladder_touched")
# show oxygen count on low oxygen
if underwater:
if oxygen_timer.time_left < 5:
low_oxygen_label.text = str(floor(oxygen_timer.time_left) + 1)
else:
low_oxygen_label.text = ""
else:
low_oxygen_label.text = ""
#Cheats
#CFox mode
if Debug.cfox_mode == true:
@ -175,7 +184,7 @@ func _on_NormalJump_state_exited() -> void:
func _on_LadderJump_state_entered() -> void:
velocity.y = -jump_force
Audio.play_sound(Audio.a_jump, Audio.ac_jump)
animation_player.play("jump")
animation_player.play("ladder_jump")
func _on_DoubleJump_state_entered() -> void:
velocity.y = -double_jump_force

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=45 format=2]
[gd_scene load_steps=48 format=2]
[ext_resource path="res://objects/player/player.gd" type="Script" id=1]
[ext_resource path="res://graphics/player/palettes/default.png" type="Texture" id=2]
@ -24,6 +24,8 @@
[ext_resource path="res://graphics/player/sg_blink.png" type="Texture" id=22]
[ext_resource path="res://graphics/player/sg_stim.png" type="Texture" id=23]
[ext_resource path="res://graphics/player/sg_duck.png" type="Texture" id=24]
[ext_resource path="res://ui/2ndpuberty_outline.tres" type="Material" id=25]
[ext_resource path="res://graphics/player/sg_jump_ladder.png" type="Texture" id=26]
[sub_resource type="ShaderMaterial" id=1]
shader = ExtResource( 3 )
@ -515,6 +517,58 @@ tracks/3/keys = {
"values": [ 0.0 ]
}
[sub_resource type="Animation" id=21]
resource_name = "ladder_jump"
length = 0.001
tracks/0/type = "value"
tracks/0/path = NodePath("Graphics/Sprite:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ ExtResource( 26 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("Graphics/Sprite:hframes")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ 1 ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("Graphics/Sprite:frame")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ 0 ]
}
tracks/3/type = "value"
tracks/3/path = NodePath("Graphics/Sprite:rotation_degrees")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ 0.0 ]
}
[sub_resource type="Animation" id=17]
resource_name = "push"
length = 0.8
@ -910,6 +964,7 @@ anims/fall = SubResource( 15 )
anims/fall_scared = SubResource( 14 )
anims/idle = SubResource( 6 )
anims/jump = SubResource( 8 )
anims/ladder_jump = SubResource( 21 )
anims/push = SubResource( 17 )
anims/shoot_airborne = SubResource( 11 )
anims/shoot_grounded = SubResource( 10 )
@ -1260,6 +1315,18 @@ script = ExtResource( 8 )
wait_time = 20.0
autostart = true
[node name="JumpPeakTimer" type="Timer" parent="."]
wait_time = 0.2
[node name="LowOxygenLabel" type="Label" parent="."]
material = ExtResource( 25 )
margin_left = -8.0
margin_top = -32.0
margin_right = 8.0
margin_bottom = -18.0
theme = ExtResource( 7 )
align = 1
[connection signal="body_entered" from="Hitbox" to="." method="_on_Hitbox_body_entered"]
[connection signal="state_physics_processing" from="StateChart/Root/Movement" to="." method="_process_movement"]
[connection signal="state_entered" from="StateChart/Root/Movement/Grounded" to="." method="_on_Grounded_state_entered"]