Initial commit

This commit is contained in:
SEISYUNLie
2026-10-03 15:29:06 +08:00
commit ba36357b90
621 changed files with 13821 additions and 0 deletions
@@ -0,0 +1,17 @@
[gd_scene format=3 uid="uid://c6nnj5n0p8hew"]
[ext_resource type="Texture2D" uid="uid://cb8de6nm1sbvw" path="res://assets/game/collectibles/coin_gold_round.png" id="1_texture"]
[sub_resource type="CircleShape2D" id="Shape_coin"]
radius = 5.0
[node name="CoinGoldRound" type="Area2D" unique_id=480374752 groups=["collectible"]]
collision_layer = 16
collision_mask = 2
[node name="Sprite" type="Sprite2D" parent="." unique_id=1188104520]
texture_filter = 1
texture = ExtResource("1_texture")
[node name="PickupArea" type="CollisionShape2D" parent="." unique_id=1101990910]
shape = SubResource("Shape_coin")
@@ -0,0 +1,18 @@
[gd_scene load_steps=3 format=3]
[ext_resource type="Texture2D" path="res://assets/game/collectibles/coin_gold_thin.png" id="1_texture"]
[sub_resource type="RectangleShape2D" id="Shape_coin"]
size = Vector2(7, 13)
[node name="CoinGoldThin" type="Area2D" groups=["collectible"]]
collision_layer = 16
collision_mask = 2
[node name="Sprite" type="Sprite2D" parent="."]
texture_filter = 1
texture = ExtResource("1_texture")
[node name="PickupArea" type="CollisionShape2D" parent="."]
shape = SubResource("Shape_coin")
+18
View File
@@ -0,0 +1,18 @@
[gd_scene load_steps=3 format=3]
[ext_resource type="Texture2D" path="res://assets/game/collectibles/gem_blue.png" id="1_texture"]
[sub_resource type="CircleShape2D" id="Shape_gem"]
radius = 6.0
[node name="GemBlue" type="Area2D" groups=["collectible"]]
collision_layer = 16
collision_mask = 2
[node name="Sprite" type="Sprite2D" parent="."]
texture_filter = 1
texture = ExtResource("1_texture")
[node name="PickupArea" type="CollisionShape2D" parent="."]
shape = SubResource("Shape_gem")
@@ -0,0 +1,28 @@
[gd_scene load_steps=5 format=3]
[ext_resource type="Texture2D" path="res://assets/game/vegetation/tree_canopy_left.png" id="1_left"]
[ext_resource type="Texture2D" path="res://assets/game/vegetation/tree_canopy_middle.png" id="2_middle"]
[ext_resource type="Texture2D" path="res://assets/game/vegetation/tree_canopy_right.png" id="3_right"]
[ext_resource type="Texture2D" path="res://assets/game/vegetation/tree_trunk.png" id="4_trunk"]
[node name="TreeSmall" type="Node2D"]
[node name="CanopyLeft" type="Sprite2D" parent="."]
texture_filter = 1
position = Vector2(-18, -18)
texture = ExtResource("1_left")
[node name="CanopyMiddle" type="Sprite2D" parent="."]
texture_filter = 1
position = Vector2(0, -18)
texture = ExtResource("2_middle")
[node name="CanopyRight" type="Sprite2D" parent="."]
texture_filter = 1
position = Vector2(18, -18)
texture = ExtResource("3_right")
[node name="Trunk" type="Sprite2D" parent="."]
texture_filter = 1
texture = ExtResource("4_trunk")
+10
View File
@@ -0,0 +1,10 @@
extends Area2D
var damage = 1
func _ready():
body_entered.connect(_on_body_entered)
func _on_body_entered(body):
if body.is_in_group("player"):
body.take_damage(damage)
@@ -0,0 +1 @@
uid://3ugbvq1iadqi
+20
View File
@@ -0,0 +1,20 @@
[gd_scene format=3 uid="uid://dh3mm14yem44n"]
[ext_resource type="Script" uid="uid://3ugbvq1iadqi" path="res://scenes/prefabs/hazards/spikes_double.gd" id="1_hlpjn"]
[ext_resource type="Texture2D" uid="uid://wmoyejtjsmhh" path="res://assets/game/obstacles/spikes_double.png" id="1_texture"]
[sub_resource type="RectangleShape2D" id="Shape_spikes"]
size = Vector2(14, 6)
[node name="SpikesDouble" type="Area2D" unique_id=1646987965 groups=["hazard"]]
collision_layer = 4
collision_mask = 2
script = ExtResource("1_hlpjn")
[node name="Sprite" type="Sprite2D" parent="." unique_id=997342456]
texture_filter = 1
texture = ExtResource("1_texture")
[node name="DetectionArea" type="CollisionShape2D" parent="." unique_id=997417100]
position = Vector2(0, 4)
shape = SubResource("Shape_spikes")
@@ -0,0 +1,21 @@
extends Area2D
var ok = true
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
body_entered.connect(_in)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _in(body):
if body.is_in_group("player") and body.velocity.y > 0 and ok :
body.velocity.y = -300
body.reset_jump()
ok = false
get_tree().create_timer(0.2).timeout.connect(reset)
func reset():
ok = true
@@ -0,0 +1 @@
uid://dffa4gfegesjp
@@ -0,0 +1,20 @@
[gd_scene format=3 uid="uid://jbye06it1ov5"]
[ext_resource type="Script" uid="uid://dffa4gfegesjp" path="res://scenes/prefabs/interactables/spring_red.gd" id="1_i3l3r"]
[ext_resource type="Texture2D" uid="uid://b7wkoed3ty7em" path="res://assets/game/interactables/spring_red.png" id="1_texture"]
[sub_resource type="RectangleShape2D" id="Shape_spring"]
size = Vector2(14, 6)
[node name="SpringRed" type="Area2D" unique_id=742449581 groups=["spring"]]
collision_layer = 8
collision_mask = 2
script = ExtResource("1_i3l3r")
[node name="Sprite" type="Sprite2D" parent="." unique_id=183929814]
texture_filter = 1
texture = ExtResource("1_texture")
[node name="ActivationArea" type="CollisionShape2D" parent="." unique_id=716768850]
position = Vector2(0, -2)
shape = SubResource("Shape_spring")
@@ -0,0 +1,9 @@
[gd_scene load_steps=2 format=3]
[ext_resource type="Texture2D" path="res://assets/game/signs/direction_sign_left.png" id="1_texture"]
[node name="DirectionSignLeft" type="Node2D"]
[node name="Sprite" type="Sprite2D" parent="."]
texture_filter = 1
texture = ExtResource("1_texture")
@@ -0,0 +1,10 @@
[gd_scene load_steps=2 format=3]
[ext_resource type="Texture2D" path="res://assets/game/signs/direction_sign_right.png" id="1_texture"]
[node name="DirectionSignRight" type="Node2D"]
[node name="Sprite" type="Sprite2D" parent="."]
texture_filter = 1
texture = ExtResource("1_texture")
+18
View File
@@ -0,0 +1,18 @@
[gd_scene load_steps=3 format=3]
[ext_resource type="Texture2D" path="res://assets/game/structures/crate.png" id="1_texture"]
[sub_resource type="RectangleShape2D" id="Shape_crate"]
size = Vector2(18, 18)
[node name="Crate" type="StaticBody2D"]
collision_layer = 1
collision_mask = 0
[node name="Sprite" type="Sprite2D" parent="."]
texture_filter = 1
texture = ExtResource("1_texture")
[node name="Collision" type="CollisionShape2D" parent="."]
shape = SubResource("Shape_crate")