This commit is contained in:
pennyrigate 2025-07-19 16:54:36 -04:00
commit 6a269eb236
97 changed files with 2137 additions and 0 deletions

View file

@ -0,0 +1,12 @@
extends Node2D
@export var score = 0
const PARTICLES = preload("res://objects/scoreitem/scoreitem_particles.tscn")
func _on_area_2d_area_entered(area: Area2D) -> void:
if area.is_in_group("player_hitbox"):
GlobalFunctions.queue_score(score)
var particles = PARTICLES.instantiate()
particles.global_position = global_position
get_owner().add_child(particles)
queue_free()

View file

@ -0,0 +1 @@
uid://8wiyfiyykh6t

View file

@ -0,0 +1,56 @@
[gd_scene load_steps=10 format=3 uid="uid://bskdt3t8fae6m"]
[ext_resource type="Script" uid="uid://8wiyfiyykh6t" path="res://objects/scoreitem/scoreitem.gd" id="1_8u3vk"]
[ext_resource type="Texture2D" uid="uid://dr1uub2l0vdh4" path="res://sprites/screw/0c575d08-e62d-4013-9e08-172d0662fcda.png" id="1_e6x4u"]
[ext_resource type="Texture2D" uid="uid://csqvymhme5h8t" path="res://sprites/screw/23b869e4-5707-44a8-8bbc-a788d5c71275.png" id="2_8u3vk"]
[ext_resource type="Texture2D" uid="uid://bptdaaemdeqt" path="res://sprites/screw/6ca66360-a47d-4690-88f8-b9c160416be3.png" id="3_oad3k"]
[ext_resource type="Texture2D" uid="uid://dud5u6ojbsupr" path="res://sprites/screw/72235a50-452c-4104-a5b4-447ee5c42785.png" id="4_e7vhn"]
[ext_resource type="Texture2D" uid="uid://dutm1rklnb33t" path="res://sprites/screw/30656deb-ca75-4981-8198-ad555b89764a.png" id="5_dfapo"]
[ext_resource type="Texture2D" uid="uid://cvuhonmcq21hk" path="res://sprites/screw/c433a95b-a214-4bdd-b58e-8ef611c6be46.png" id="6_uywcb"]
[sub_resource type="SpriteFrames" id="SpriteFrames_dayts"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("1_e6x4u")
}, {
"duration": 1.0,
"texture": ExtResource("2_8u3vk")
}, {
"duration": 1.0,
"texture": ExtResource("3_oad3k")
}, {
"duration": 1.0,
"texture": ExtResource("4_e7vhn")
}, {
"duration": 1.0,
"texture": ExtResource("5_dfapo")
}, {
"duration": 1.0,
"texture": ExtResource("6_uywcb")
}],
"loop": true,
"name": &"default",
"speed": 15.0
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_e6x4u"]
size = Vector2(15, 15)
[node name="Scoreitem" type="Node2D"]
script = ExtResource("1_8u3vk")
score = 10
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
scale = Vector2(0.2, 0.2)
sprite_frames = SubResource("SpriteFrames_dayts")
autoplay = "default"
frame_progress = 0.340073
[node name="Area2D" type="Area2D" parent="."]
collision_layer = 4
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource("RectangleShape2D_e6x4u")
[connection signal="area_entered" from="Area2D" to="." method="_on_area_2d_area_entered"]

View file

@ -0,0 +1,7 @@
extends CPUParticles2D
func _ready() -> void:
emitting = true
func _on_finished() -> void:
queue_free()

View file

@ -0,0 +1 @@
uid://bdcxqp8royr5u

View file

@ -0,0 +1,32 @@
[gd_scene load_steps=4 format=3 uid="uid://bsmmvt6hf6m5b"]
[ext_resource type="Script" uid="uid://bdcxqp8royr5u" path="res://objects/scoreitem/scoreitem_particles.gd" id="1_aeam7"]
[ext_resource type="AudioStream" uid="uid://c7h4qdg8gtnhk" path="res://audio/sfx/key.ogg" id="2_rwya6"]
[sub_resource type="Gradient" id="Gradient_aeam7"]
offsets = PackedFloat32Array(0, 0.513333, 1)
colors = PackedColorArray(1, 0, 0, 1, 1, 1, 0.568627, 1, 1, 1, 1, 1)
[node name="CPUParticles2D" type="CPUParticles2D"]
emitting = false
amount = 38
lifetime = 0.2
one_shot = true
speed_scale = 0.5
explosiveness = 1.0
randomness = 1.0
lifetime_randomness = 1.0
spread = 154.09
gravity = Vector2(0, 630)
initial_velocity_min = 251.99
initial_velocity_max = 484.86
scale_amount_min = 1.5
scale_amount_max = 2.5
color_ramp = SubResource("Gradient_aeam7")
script = ExtResource("1_aeam7")
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource("2_rwya6")
autoplay = true
[connection signal="finished" from="." to="." method="_on_finished"]