Initial commit: Godot 4.7 pixel platformer prototype

Player: move/jump (Space), test flight (F, debug builds only). Key: pickup, hold S to aim with live trajectory preview, release to throw, W to warp to the thrown key. Spring bounce. Spikes deal damage. 3-heart health, Z consumes a heal item for +1 heart and a 5s shield. HUD with hearts and item count. Death screen with fade-to-black and restart. Hidden passages. Assets: Kenney Pixel Platformer (CC0).
This commit is contained in:
2026-10-07 20:32:42 +08:00
commit 9dffacd938
558 changed files with 12258 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
extends Area2D
## 走到就捡走,给玩家增加一次"回血道具"。
## 碰撞掩码已经限制成只检测玩家那一层,所以进到这里的一定是玩家。
func _ready() -> void:
body_entered.connect(_on_body_entered)
func _on_body_entered(body: Node2D) -> void:
if body.has_method("add_heal_item"):
body.add_heal_item()
queue_free()