Merge branch 'dev' of https://code.booklordofthe.dev/Booklordofthedings/GMTK-2024 into dev
This commit is contained in:
commit
4982fc55bf
14 changed files with 90 additions and 44 deletions
|
@ -29,7 +29,7 @@ func activate_plate():
|
|||
print("wird aktiviert")
|
||||
if not is_activated:
|
||||
is_activated = true
|
||||
if laser:
|
||||
if laser and weakref(laser).get_ref():
|
||||
laser.queue_free()
|
||||
# TODO: fix error when called again
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
extends CharacterBody2D
|
||||
|
||||
@export var sfx : AudioStreamPlayer2D
|
||||
@export var sfx_large : AudioStreamPlayer2D
|
||||
|
||||
@export var speed = 340
|
||||
@export var gravity = 50
|
||||
var jump_count = 1
|
||||
|
@ -96,7 +98,7 @@ func _physics_process(delta):
|
|||
var box = get_slide_collision(i).get_collider() as Box
|
||||
if scale.x == 2:
|
||||
if box and velocity.y >= 0:
|
||||
box.velocity.x = velocity.x*0.8
|
||||
box.velocity.x = velocity.x*1.2
|
||||
else:
|
||||
if box and velocity.y >= 0 and box.scale.x < 2:
|
||||
box.velocity.x = velocity.x*0.8
|
||||
|
@ -104,11 +106,12 @@ func _physics_process(delta):
|
|||
update_cursor()
|
||||
|
||||
func Jump():
|
||||
sfx.play()
|
||||
if scale.x == 1:
|
||||
velocity.y = -1 * jump_strength
|
||||
sfx.play()
|
||||
else :
|
||||
velocity.y = -1 * jump_strength_large
|
||||
sfx_large.play()
|
||||
jump_count = 0
|
||||
is_touching_floor = false
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue