This commit is contained in:
Jonas Braus
2024-08-04 17:23:08 +02:00
parent 2e845bf217
commit 08f75b79d8
18 changed files with 392 additions and 129 deletions
+1 -3
View File
@@ -17,7 +17,6 @@ extends CharacterBody2D
const SPEED = 130.0
var JUMPt_velocity = -360.0
var org_jump_veloc : int
var on_pipe = false
var right_pipe = false
var left_pipe = false
@@ -70,7 +69,6 @@ func _unhandled_input(event):
func _ready():
color_rect.visible = false
org_jump_veloc = JUMPt_velocity
pipedetector_ground.position.y = 0
collision_shape_2d.shape.height = 15
@@ -85,9 +83,9 @@ func _process(delta):
# check pipe
if on_pipe and (Input.is_action_just_pressed("crawl") or crawl) and is_on_floor() or right_pipe and (Input.is_action_pressed("move_right") or t_velocity > 0):
on_pause = true
pipe_sound.play()
crawl = false
on_pause = true
t_velocity = 0
color_rect.visible = true
pipe_timer.start()