Newer
Older
DungeonShooting / prefab / weapon / Gun.tscn
@小李xl 小李xl on 15 Jun 2022 946 bytes 给枪套添加切换武器接口
  1. [gd_scene load_steps=4 format=2]
  2.  
  3. [ext_resource path="res://src/weapon/gun/OrdinaryGun.cs" type="Script" id=1]
  4. [ext_resource path="res://resource/sprite/gun/gun1.png" type="Texture" id=3]
  5.  
  6. [sub_resource type="RectangleShape2D" id=1]
  7. extents = Vector2( 9.5, 3.5 )
  8.  
  9. [node name="Gun" type="Node2D"]
  10. z_index = 5
  11. script = ExtResource( 1 )
  12.  
  13. [node name="GunSprite" type="Sprite" parent="."]
  14. position = Vector2( 4, -3 )
  15. scale = Vector2( 0.8, 0.8 )
  16. texture = ExtResource( 3 )
  17.  
  18. [node name="OriginPoint" type="Position2D" parent="."]
  19. position = Vector2( 0, -1.5 )
  20.  
  21. [node name="ShellPoint" type="Position2D" parent="."]
  22. position = Vector2( 1, -3 )
  23.  
  24. [node name="FirePoint" type="Position2D" parent="."]
  25. position = Vector2( 11, -1.5 )
  26.  
  27. [node name="Area" type="Area2D" parent="."]
  28. collision_layer = 4
  29. collision_mask = 0
  30.  
  31. [node name="Collision" type="CollisionShape2D" parent="Area"]
  32. position = Vector2( 4.2, -0.199999 )
  33. shape = SubResource( 1 )
  34. disabled = true