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:
@@ -0,0 +1,48 @@
|
||||
[gd_scene load_steps=4 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/death_screen.gd" id="1_death"]
|
||||
|
||||
[sub_resource type="SystemFont" id="SystemFont_cjk"]
|
||||
font_names = PackedStringArray("Microsoft YaHei UI", "Microsoft YaHei", "SimHei", "Noto Sans CJK SC", "sans-serif")
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_button"]
|
||||
bg_color = Color(0.75, 0.2, 0.2, 1)
|
||||
corner_radius_top_left = 3
|
||||
corner_radius_top_right = 3
|
||||
corner_radius_bottom_right = 3
|
||||
corner_radius_bottom_left = 3
|
||||
content_margin_left = 18.0
|
||||
content_margin_top = 6.0
|
||||
content_margin_right = 18.0
|
||||
content_margin_bottom = 6.0
|
||||
|
||||
[node name="DeathScreen" type="CanvasLayer"]
|
||||
layer = 10
|
||||
script = ExtResource("1_death")
|
||||
|
||||
[node name="Fade" type="ColorRect" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
mouse_filter = 2
|
||||
color = Color(0, 0, 0, 0)
|
||||
|
||||
[node name="Center" type="CenterContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="VBox" type="VBoxContainer" parent="Center"]
|
||||
theme_override_constants/separation = 14
|
||||
|
||||
[node name="Title" type="Label" parent="Center/VBox"]
|
||||
theme_override_colors/font_color = Color(1, 0.36, 0.36, 1)
|
||||
theme_override_fonts/font = SubResource("SystemFont_cjk")
|
||||
theme_override_font_sizes/font_size = 24
|
||||
text = "你死了"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="RestartButton" type="Button" parent="Center/VBox"]
|
||||
theme_override_fonts/font = SubResource("SystemFont_cjk")
|
||||
theme_override_font_sizes/font_size = 14
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_button")
|
||||
text = "重新开始 (R)"
|
||||
Reference in New Issue
Block a user