mirror of
https://github.com/Steffo99/looping-for-loops.git
synced 2024-11-21 15:44:24 +00:00
Merge cheats branch which was lost somewhere in time
This commit is contained in:
commit
c8c8906948
2 changed files with 22 additions and 6 deletions
|
@ -10,6 +10,7 @@ export(float) var jump_speed: float = 425
|
||||||
export(float) var jump_buffer_msec: float = 80
|
export(float) var jump_buffer_msec: float = 80
|
||||||
export(float) var quick_fall_gravity_multiplier: float = 4
|
export(float) var quick_fall_gravity_multiplier: float = 4
|
||||||
export(bool) var stop_jump_on_bonk: bool = true
|
export(bool) var stop_jump_on_bonk: bool = true
|
||||||
|
export(bool) var invincible: bool = false
|
||||||
|
|
||||||
var speed: Vector2 = Vector2.ZERO
|
var speed: Vector2 = Vector2.ZERO
|
||||||
var can_jump: bool = false
|
var can_jump: bool = false
|
||||||
|
@ -76,6 +77,15 @@ func _process(delta):
|
||||||
$Body.animation = "neutral"
|
$Body.animation = "neutral"
|
||||||
$Donut.animation = "neutral"
|
$Donut.animation = "neutral"
|
||||||
$Legs.animation = "neutral"
|
$Legs.animation = "neutral"
|
||||||
|
|
||||||
|
if Input.is_action_just_pressed("cheat_invincible"):
|
||||||
|
if invincible:
|
||||||
|
$Body.modulate = Color.white
|
||||||
|
$Legs.modulate = Color.white
|
||||||
|
else:
|
||||||
|
$Body.modulate = Color.cyan
|
||||||
|
$Legs.modulate = Color.cyan
|
||||||
|
invincible = not invincible
|
||||||
|
|
||||||
|
|
||||||
func _physics_process(_delta):
|
func _physics_process(_delta):
|
||||||
|
@ -128,16 +138,17 @@ func _physics_process(_delta):
|
||||||
|
|
||||||
func win():
|
func win():
|
||||||
print("YOU WIN!")
|
print("YOU WIN!")
|
||||||
print("You collected %s loops." % loops_collected)
|
print("You collected %d loops." % loops_collected)
|
||||||
$FadeTo/AnimationPlayer.play("FadeToWhite")
|
$FadeTo/AnimationPlayer.play("FadeToWhite")
|
||||||
|
|
||||||
func die():
|
func die():
|
||||||
print("YOU DIED")
|
print("YOU DIED")
|
||||||
print("You collected %s loops." % loops_collected)
|
print("You collected %d loops." % loops_collected)
|
||||||
$Body.visible = false
|
if not invincible:
|
||||||
$Donut.visible = false
|
$Body.visible = false
|
||||||
$Legs.visible = false
|
$Donut.visible = false
|
||||||
$FadeTo/AnimationPlayer.play("FadeToBlack")
|
$Legs.visible = false
|
||||||
|
$FadeTo/AnimationPlayer.play("FadeToBlack")
|
||||||
|
|
||||||
|
|
||||||
func _on_WinDoor_body_entered(body):
|
func _on_WinDoor_body_entered(body):
|
||||||
|
|
|
@ -184,6 +184,11 @@ cheat_slower={
|
||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777249,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777249,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
cheat_invincible={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777252,"unicode":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
[layer_names]
|
[layer_names]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue