Newer
Older
DungeonShooting / prefab / Gun.tscn
@小李xl 小李xl on 1 Jun 2022 1006 bytes 添加粗糙的开火特效
[gd_scene load_steps=5 format=2]

[ext_resource path="res://resource/sprite/gun/gun1.png" type="Texture" id=1]
[ext_resource path="res://src/gun/OrdinaryGun.cs" type="Script" id=2]
[ext_resource path="res://prefab/effect/Fire.tscn" type="PackedScene" id=3]

[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 9.5, 3.5 )

[node name="Gun" type="Node2D"]
script = ExtResource( 2 )
FirePrefab = ExtResource( 3 )

[node name="GunSprite" type="Sprite" parent="."]
position = Vector2( 4, -3 )
scale = Vector2( 0.8, 0.8 )
texture = ExtResource( 1 )

[node name="OriginPoint" type="Position2D" parent="."]
position = Vector2( 0, -1.5 )
scale = Vector2( 0.8, 0.8 )

[node name="FirePoint" type="Position2D" parent="."]
position = Vector2( 11, -1.5 )
scale = Vector2( 0.8, 0.8 )

[node name="Area" type="Area2D" parent="."]
collision_layer = 4
collision_mask = 0

[node name="Collision" type="CollisionShape2D" parent="Area"]
position = Vector2( 4.2, -0.199999 )
shape = SubResource( 1 )
disabled = true