spark particles when an arrow collides with tiles or is blocked
This commit is contained in:
parent
7abd3fbb42
commit
30d7e84a46
2 changed files with 43 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=10 format=2]
|
||||
[gd_scene load_steps=13 format=2]
|
||||
|
||||
[ext_resource path="res://scripts/1px_border.gdshader" type="Shader" id=1]
|
||||
[ext_resource path="res://graphics/player/arrow.png" type="Texture" id=2]
|
||||
|
@ -35,6 +35,28 @@ scale_curve = SubResource( 4 )
|
|||
[sub_resource type="RectangleShape2D" id=2]
|
||||
extents = Vector2( 5.5, 3.5 )
|
||||
|
||||
[sub_resource type="Curve" id=6]
|
||||
_data = [ Vector2( 0, 1 ), 0.0, -1.45746, 0, 0, Vector2( 1, 0 ), 0.00323196, 0.0, 0, 0 ]
|
||||
|
||||
[sub_resource type="CurveTexture" id=7]
|
||||
width = 32
|
||||
curve = SubResource( 6 )
|
||||
|
||||
[sub_resource type="ParticlesMaterial" id=8]
|
||||
flag_disable_z = true
|
||||
spread = 180.0
|
||||
gravity = Vector3( 0, 0, 0 )
|
||||
initial_velocity = 30.0
|
||||
initial_velocity_random = 0.5
|
||||
orbit_velocity = 0.0
|
||||
orbit_velocity_random = 0.0
|
||||
damping = 50.0
|
||||
angle = 720.0
|
||||
angle_random = 1.0
|
||||
scale = 0.3
|
||||
scale_curve = SubResource( 7 )
|
||||
color = Color( 1, 1, 0.290196, 1 )
|
||||
|
||||
[node name="ArrowProjectile" type="Node2D"]
|
||||
script = ExtResource( 3 )
|
||||
|
||||
|
@ -59,5 +81,14 @@ collision_layer = 0
|
|||
position = Vector2( -0.5, -0.5 )
|
||||
shape = SubResource( 2 )
|
||||
|
||||
[node name="SparkParticles" type="Particles2D" parent="."]
|
||||
position = Vector2( 4, 0 )
|
||||
emitting = false
|
||||
amount = 16
|
||||
lifetime = 0.5
|
||||
explosiveness = 1.0
|
||||
process_material = SubResource( 8 )
|
||||
texture = ExtResource( 4 )
|
||||
|
||||
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]
|
||||
[connection signal="body_entered" from="Hitbox" to="." method="_on_Hitbox_body_entered"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue