Merge remote-tracking branch 'origin' into quests
This commit is contained in:
commit
fe4a15c76b
27 files changed
+577
-28
No files matched your search
+16
-6
@@ -5,9 +5,7 @@ const DASH_SPEED = 600
|
||||
const HORIZONTAL_DASH_MULT = 1.8
|
||||
const FRICTION = 100
|
||||
const GRAVITY_MULT = 0.8
|
||||
|
||||
const JUMP_VELOCITY = -410.0
|
||||
|
||||
const DASH_LENGTH = 0.2
|
||||
|
||||
var fall_timer = 0.0
|
||||
@@ -31,7 +29,6 @@ func refresh_dash(new_dashes):
|
||||
dashes = 1
|
||||
if dashes > 0:
|
||||
$Jetpack/DashIndicator.show()
|
||||
|
||||
|
||||
func refresh_jump(new_jumps):
|
||||
if new_jumps:
|
||||
@@ -69,6 +66,7 @@ func on_teleport():
|
||||
$Camera2D.position_smoothing_enabled = true
|
||||
await get_tree().create_timer(1).timeout
|
||||
teleport_cooldown = 0
|
||||
|
||||
func spawn_ghost(position):
|
||||
var ghost = preload("res://ghost.tscn")
|
||||
ghost = ghost.instantiate()
|
||||
@@ -131,8 +129,17 @@ func _process(delta: float) -> void:
|
||||
elif direction > 0:
|
||||
$Sprite2D.flip_h = false
|
||||
$Sprite2D/HatSprite.flip_h = false
|
||||
|
||||
if Input.is_action_just_pressed("dash") and dashes > 0:
|
||||
|
||||
if Input.is_action_pressed("dash_down") and is_on_floor():
|
||||
print("Crouching")
|
||||
$Sprite2D.play("crouch")
|
||||
print("MODULATE: " + str($Parallax2D/Sprite2D.modulate))
|
||||
$Parallax2D/Sprite2D.modulate = Color.CYAN
|
||||
|
||||
for hidden_object in get_tree().get_nodes_in_group("Hidden"):
|
||||
hidden_object.show()
|
||||
|
||||
elif Input.is_action_just_pressed("dash") and dashes > 0:
|
||||
dashing = true
|
||||
dashes -= 1
|
||||
velocity = Vector2(
|
||||
@@ -153,8 +160,11 @@ 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
|
||||
|
||||
#print("PLAYER X POSITION: " + str(position.y))
|
||||
for hidden_object in get_tree().get_nodes_in_group("Hidden"):
|
||||
hidden_object.hide()
|
||||
|
||||
#Falling to death.
|
||||
if position.y >= death_threshold:
|
||||
print("SLASH KILL")
|
||||
|
||||
Reference in new issue
Block a user