revo-jailbreak/objects/player/arrow_projectile.tscn
2022-12-17 22:47:46 -05:00

35 lines
1.2 KiB
Text

[gd_scene load_steps=6 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]
[ext_resource path="res://objects/player/arrow_projectile.gd" type="Script" id=3]
[sub_resource type="ShaderMaterial" id=1]
shader = ExtResource( 1 )
shader_param/border_color = Color( 0, 0, 0, 1 )
shader_param/border_corners = true
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 5.5, 3.5 )
[node name="ArrowProjectile" type="Node2D"]
script = ExtResource( 3 )
[node name="Sprite" type="Sprite" parent="."]
material = SubResource( 1 )
z_index = -1
texture = ExtResource( 2 )
[node name="Area2D" type="Area2D" parent="." groups=["arrow"]]
visible = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2( -0.5, -0.5 )
shape = SubResource( 2 )
[node name="VisibilityNotifier2D" type="VisibilityNotifier2D" parent="."]
position = Vector2( -0.5, -0.5 )
scale = Vector2( 0.55, 0.35 )
[connection signal="body_entered" from="Area2D" to="." method="_on_Area2D_body_entered"]
[connection signal="screen_exited" from="VisibilityNotifier2D" to="." method="_on_VisibilityNotifier2D_screen_exited"]