Launcher.tscn 1.1 KB

1234567891011121314151617181920212223242526272829
  1. [gd_scene load_steps=5 format=2]
  2. [ext_resource path="res://component/entity/launcher/Launcher.gd" type="Script" id=1]
  3. [ext_resource path="res://component/entity/launcher/visor.png" type="Texture" id=2]
  4. [ext_resource path="res://component/entity/launcher/TargetLine.gd" type="Script" id=3]
  5. [ext_resource path="res://component/entity/launcher/launcher.png" type="Texture" id=4]
  6. [node name="Launcher" type="Node2D"]
  7. script = ExtResource( 1 )
  8. visor_ratio = 1.6
  9. [node name="TargetLine" type="RayCast2D" parent="."]
  10. position = Vector2( 200, 400 )
  11. collision_mask = 6
  12. script = ExtResource( 3 )
  13. [node name="TargetVisor" type="Sprite" parent="TargetLine"]
  14. texture = ExtResource( 2 )
  15. [node name="Source" type="Sprite" parent="."]
  16. position = Vector2( 200, 400 )
  17. texture = ExtResource( 4 )
  18. [node name="ShootDelay" type="Timer" parent="."]
  19. wait_time = 0.1
  20. one_shot = true
  21. [connection signal="get_firing" from="." to="." method="_on_Launcher_get_firing"]
  22. [connection signal="move_visor" from="." to="TargetLine" method="_on_Launcher_move_visor"]
  23. [connection signal="timeout" from="ShootDelay" to="." method="_on_ShootDelay_timeout"]