57 lines
1.9 KiB
Text
57 lines
1.9 KiB
Text
[gd_scene load_steps=8 format=3 uid="uid://djdpcsmms727b"]
|
|
|
|
[ext_resource type="Script" uid="uid://b6krgij5xfu1w" path="res://objects/effects/bouncing_spark.gd" id="1_62ynp"]
|
|
[ext_resource type="Texture2D" uid="uid://rhc3c5j1lfw" path="res://assets/textures/effects/spark.png" id="1_ag5ij"]
|
|
[ext_resource type="AudioStream" uid="uid://cmvbwm6gk8n6b" path="res://assets/audio/sfx/spark_bounce.ogg" id="3_4uvf2"]
|
|
|
|
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_62ynp"]
|
|
bounce = 0.8
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_4uvf2"]
|
|
radius = 2.0
|
|
|
|
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_us66k"]
|
|
random_pitch = 1.25
|
|
streams_count = 1
|
|
stream_0/stream = ExtResource("3_4uvf2")
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_us66k"]
|
|
radius = 6.0
|
|
|
|
[node name="Spark" type="RigidBody2D"]
|
|
z_index = -10
|
|
collision_layer = 0
|
|
collision_mask = 3
|
|
mass = 0.1
|
|
physics_material_override = SubResource("PhysicsMaterial_62ynp")
|
|
gravity_scale = 0.25
|
|
linear_damp = 0.3
|
|
script = ExtResource("1_62ynp")
|
|
scale_min = 0.5
|
|
scale_max = 1.0
|
|
velocity_min = 40.0
|
|
velocity_max = 80.0
|
|
spin_min = -1.5708
|
|
spin_max = 1.5708
|
|
decay_speed_threshold = 15.0
|
|
decay_time = 0.2
|
|
|
|
[node name="Sprite2D" type="Sprite2D" parent="."]
|
|
texture = ExtResource("1_ag5ij")
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
shape = SubResource("CircleShape2D_4uvf2")
|
|
|
|
[node name="BounceSound" type="AudioStreamPlayer2D" parent="."]
|
|
stream = SubResource("AudioStreamRandomizer_us66k")
|
|
bus = &"Sound Effects"
|
|
|
|
[node name="SolidDetector" type="Area2D" parent="."]
|
|
collision_layer = 0
|
|
collision_mask = 3
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="SolidDetector"]
|
|
shape = SubResource("CircleShape2D_us66k")
|
|
|
|
[connection signal="body_entered" from="SolidDetector" to="." method="_on_solid_detector_body_entered"]
|
|
[connection signal="body_entered" from="SolidDetector" to="BounceSound" method="play" unbinds=1]
|