Hide the debug fly and level skip behind a 房★主★有★神★器★ easter-egg panel
cheat_panel replaces the level_skip autoload: a single small button in the top-right opens a panel holding the fly toggle and the level jump buttons, so nothing that looks like leftover debug UI is on screen. The fly is no longer gated behind OS.is_debug_build, so the easter egg works in exported builds too, and the 1/2/3 shortcuts only fire while the panel is open so they cannot be hit by accident. Space stays unbound and no gameplay content was touched.
This commit is contained in:
@@ -357,7 +357,8 @@ func _build_throw_visuals() -> void:
|
||||
# ---------------------------------------------------------------- 测试用飞行
|
||||
|
||||
func fly_available() -> bool:
|
||||
return debug_fly and OS.is_debug_build()
|
||||
# 这是藏在「房★主★有★神★器★」面板里的隐藏技能,正式版里也能用
|
||||
return debug_fly
|
||||
|
||||
|
||||
func set_flying(on: bool) -> void:
|
||||
@@ -368,10 +369,13 @@ func set_flying(on: bool) -> void:
|
||||
|
||||
|
||||
func handle_fly_movement() -> void:
|
||||
# get_axis(负方向, 正方向),屏幕坐标里 y 向下为正,所以空格(跳跃)要放在负方向
|
||||
# 跳跃键已经停用了,所以调试飞行改用方向键上下(S 也保留作下降)来控制升降
|
||||
var vertical := Input.get_axis("ui_up", "ui_down")
|
||||
if is_zero_approx(vertical) and Input.is_action_pressed("squat"):
|
||||
vertical = 1.0
|
||||
var direction := Vector2(
|
||||
Input.get_axis("move_left", "move_right"),
|
||||
Input.get_axis("jump", "squat")
|
||||
vertical
|
||||
)
|
||||
if direction == Vector2.ZERO:
|
||||
velocity = Vector2.ZERO
|
||||
|
||||
Reference in New Issue
Block a user