This commit is contained in:
2024-05-17 12:48:20 +08:00
parent 3afb13063e
commit b9430b518a
9260 changed files with 266058 additions and 0 deletions

16
pickups/finish.gd Normal file
View File

@@ -0,0 +1,16 @@
extends Area2D
func _on_body_entered(body):
if body.name == 'Player':
var tween = get_tree().create_tween()
tween.tween_property(self, "position", position - Vector2(0, 25), 0.3)
var tween1 = get_tree().create_tween()
tween1.tween_property(self, "modulate:a", 0, 0.3)
tween1.tween_callback(queue_free)
#tween1.tween_callback(Core.next_level)
if Core.current_level == 1:
tween1.tween_callback(Core.next_level)
elif Core.current_level == 2:
tween1.tween_callback(Core.prev_level)

35
pickups/finish.tscn Normal file
View File

@@ -0,0 +1,35 @@
[gd_scene load_steps=6 format=3 uid="uid://bsd886cj6lepi"]
[ext_resource type="Script" path="res://pickups/finish.gd" id="1_8hfb0"]
[ext_resource type="Texture2D" uid="uid://c1ceng2ivhmud" path="res://assets/platformer-art-deluxe/Base pack/Items/flagGreen2.png" id="2_2mega"]
[ext_resource type="Texture2D" uid="uid://bcx1ro2x36cew" path="res://assets/platformer-art-deluxe/Base pack/Items/flagGreen.png" id="3_jxquq"]
[sub_resource type="CircleShape2D" id="CircleShape2D_h6oc4"]
radius = 15.0
[sub_resource type="SpriteFrames" id="SpriteFrames_fvgj8"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("2_2mega")
}, {
"duration": 1.0,
"texture": ExtResource("3_jxquq")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]
[node name="Finish" type="Area2D"]
script = ExtResource("1_8hfb0")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_h6oc4")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
scale = Vector2(0.3, 0.3)
sprite_frames = SubResource("SpriteFrames_fvgj8")
frame_progress = 0.898625
[connection signal="body_entered" from="." to="." method="_on_body_entered"]

14
pickups/star.gd Normal file
View File

@@ -0,0 +1,14 @@
extends Area2D
func _on_body_entered(body):
if body.name == 'Player':
var tween = get_tree().create_tween()
tween.tween_property(self, "position", position - Vector2(0, 25), 0.3)
var tween1 = get_tree().create_tween()
tween1.tween_property(self, "modulate:a", 0, 0.3)
tween.tween_callback(queue_free)
body.add_star()

20
pickups/star.tscn Normal file
View File

@@ -0,0 +1,20 @@
[gd_scene load_steps=4 format=3 uid="uid://553vh86y3h8t"]
[ext_resource type="Script" path="res://pickups/star.gd" id="1_4sy1d"]
[ext_resource type="Texture2D" uid="uid://cuayrx0tr2r75" path="res://assets/platformer-art-deluxe/Base pack/Items/star.png" id="2_t8wcv"]
[sub_resource type="CircleShape2D" id="CircleShape2D_wifu3"]
radius = 15.0
[node name="Star" type="Area2D"]
script = ExtResource("1_4sy1d")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_wifu3")
[node name="Sprite2D" type="Sprite2D" parent="."]
position = Vector2(1.90735e-06, -1.90735e-06)
scale = Vector2(0.6, 0.6)
texture = ExtResource("2_t8wcv")
[connection signal="body_entered" from="." to="." method="_on_body_entered"]