diff --git a/prefab/Gun.tscn b/prefab/Gun.tscn index 449a8b3..14823b5 100644 --- a/prefab/Gun.tscn +++ b/prefab/Gun.tscn @@ -1,13 +1,15 @@ -[gd_scene load_steps=4 format=2] +[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 ) diff --git a/prefab/Player.tscn b/prefab/Player.tscn index dc42a64..5432380 100644 --- a/prefab/Player.tscn +++ b/prefab/Player.tscn @@ -7,6 +7,3 @@ [node name="Player" instance=ExtResource( 1 )] script = ExtResource( 2 ) GunPrefab = ExtResource( 4 ) - -[node name="AnimatedSprite" parent="." index="0"] -frame = 1 diff --git a/prefab/Role.tscn b/prefab/Role.tscn index 277d619..e0d66fb 100644 --- a/prefab/Role.tscn +++ b/prefab/Role.tscn @@ -4,21 +4,21 @@ [ext_resource path="res://src/role/Role.cs" type="Script" id=2] [ext_resource path="res://resource/sprite/role/role2.png" type="Texture" id=3] -[sub_resource type="AtlasTexture" id=17] +[sub_resource type="AtlasTexture" id=21] atlas = ExtResource( 1 ) -region = Rect2( 0, 24, 16, 24 ) +region = Rect2( 0, 48, 16, 24 ) -[sub_resource type="AtlasTexture" id=18] +[sub_resource type="AtlasTexture" id=22] atlas = ExtResource( 1 ) -region = Rect2( 16, 24, 16, 24 ) +region = Rect2( 16, 48, 16, 24 ) -[sub_resource type="AtlasTexture" id=19] +[sub_resource type="AtlasTexture" id=23] atlas = ExtResource( 1 ) -region = Rect2( 32, 24, 16, 24 ) +region = Rect2( 32, 48, 16, 24 ) -[sub_resource type="AtlasTexture" id=20] +[sub_resource type="AtlasTexture" id=24] atlas = ExtResource( 1 ) -region = Rect2( 48, 24, 16, 24 ) +region = Rect2( 48, 48, 16, 24 ) [sub_resource type="AtlasTexture" id=25] atlas = ExtResource( 1 ) @@ -36,38 +36,38 @@ atlas = ExtResource( 1 ) region = Rect2( 0, 48, 16, 24 ) -[sub_resource type="AtlasTexture" id=21] +[sub_resource type="AtlasTexture" id=17] atlas = ExtResource( 1 ) -region = Rect2( 0, 48, 16, 24 ) +region = Rect2( 0, 24, 16, 24 ) -[sub_resource type="AtlasTexture" id=22] +[sub_resource type="AtlasTexture" id=18] atlas = ExtResource( 1 ) -region = Rect2( 16, 48, 16, 24 ) +region = Rect2( 16, 24, 16, 24 ) -[sub_resource type="AtlasTexture" id=23] +[sub_resource type="AtlasTexture" id=19] atlas = ExtResource( 1 ) -region = Rect2( 32, 48, 16, 24 ) +region = Rect2( 32, 24, 16, 24 ) -[sub_resource type="AtlasTexture" id=24] +[sub_resource type="AtlasTexture" id=20] atlas = ExtResource( 1 ) -region = Rect2( 48, 48, 16, 24 ) +region = Rect2( 48, 24, 16, 24 ) [sub_resource type="SpriteFrames" id=6] animations = [ { -"frames": [ SubResource( 17 ), SubResource( 18 ), SubResource( 19 ), SubResource( 20 ) ], +"frames": [ SubResource( 21 ), SubResource( 22 ), SubResource( 23 ), SubResource( 24 ) ], "loop": true, -"name": "idle", -"speed": 7.0 +"name": "run", +"speed": 10.0 }, { "frames": [ SubResource( 25 ), SubResource( 26 ), SubResource( 27 ), SubResource( 28 ) ], "loop": true, "name": "reverseRun", "speed": 10.0 }, { -"frames": [ SubResource( 21 ), SubResource( 22 ), SubResource( 23 ), SubResource( 24 ) ], +"frames": [ SubResource( 17 ), SubResource( 18 ), SubResource( 19 ), SubResource( 20 ) ], "loop": true, -"name": "run", -"speed": 10.0 +"name": "idle", +"speed": 7.0 } ] [sub_resource type="RectangleShape2D" id=29] @@ -86,7 +86,7 @@ position = Vector2( 0, -12 ) frames = SubResource( 6 ) animation = "idle" -frame = 3 +frame = 2 playing = true [node name="HitArea" type="Area2D" parent="."] @@ -101,4 +101,4 @@ shape = SubResource( 16 ) [node name="MountPoint" type="Position2D" parent="."] -position = Vector2( 2, -6 ) +position = Vector2( 2, -4 ) diff --git a/prefab/effect/Fire.tscn b/prefab/effect/Fire.tscn new file mode 100644 index 0000000..e7a0704 --- /dev/null +++ b/prefab/effect/Fire.tscn @@ -0,0 +1,24 @@ +[gd_scene load_steps=6 format=2] + +[ext_resource path="res://resource/sprite/effect/fire/fire1.png" type="Texture" id=1] +[ext_resource path="res://resource/sprite/effect/fire/fire2.png" type="Texture" id=3] +[ext_resource path="res://resource/sprite/effect/fire/fire3.png" type="Texture" id=4] +[ext_resource path="res://src/effect/Hit.cs" type="Script" id=5] + +[sub_resource type="SpriteFrames" id=1] +animations = [ { +"frames": [ ExtResource( 1 ), ExtResource( 3 ), ExtResource( 4 ) ], +"loop": true, +"name": "Fire", +"speed": 20.0 +} ] + +[node name="Fire" type="AnimatedSprite"] +modulate = Color( 1, 0.72549, 0.25098, 1 ) +frames = SubResource( 1 ) +animation = "Fire" +frame = 2 +offset = Vector2( 3.5, 0 ) +script = ExtResource( 5 ) + +[connection signal="animation_finished" from="." to="." method="_on_Hit_animation_finished"] diff --git a/prefab/effect/FirePart.tscn b/prefab/effect/FirePart.tscn new file mode 100644 index 0000000..ecf6b1b --- /dev/null +++ b/prefab/effect/FirePart.tscn @@ -0,0 +1,24 @@ +[gd_scene load_steps=2 format=2] + +[sub_resource type="ParticlesMaterial" id=1] +flag_disable_z = true +spread = 60.0 +gravity = Vector3( 0, 0, 0 ) +initial_velocity = 200.0 +initial_velocity_random = 1.0 +orbit_velocity = 0.0 +orbit_velocity_random = 0.0 +linear_accel = -200.0 +linear_accel_random = 0.5 + +[node name="FirePart" type="Particles2D"] +emitting = false +amount = 10 +lifetime = 0.2 +one_shot = true +explosiveness = 1.0 +local_coords = false +process_material = SubResource( 1 ) +__meta__ = { +"_edit_vertical_guides_": [ ] +} diff --git a/prefab/effect/Hit.tscn b/prefab/effect/Hit.tscn index 23b68c5..9c4ee57 100644 --- a/prefab/effect/Hit.tscn +++ b/prefab/effect/Hit.tscn @@ -18,6 +18,7 @@ [node name="Hit" type="AnimatedSprite"] frames = SubResource( 1 ) animation = "Hit" +frame = 1 playing = true offset = Vector2( 1, 11 ) script = ExtResource( 6 ) diff --git a/resource/sprite/effect/fire/fire1.aseprite b/resource/sprite/effect/fire/fire1.aseprite new file mode 100644 index 0000000..1c47cfe --- /dev/null +++ b/resource/sprite/effect/fire/fire1.aseprite Binary files differ diff --git a/resource/sprite/effect/fire/fire1.png b/resource/sprite/effect/fire/fire1.png new file mode 100644 index 0000000..0182820 --- /dev/null +++ b/resource/sprite/effect/fire/fire1.png Binary files differ diff --git a/resource/sprite/effect/fire/fire1.png.import b/resource/sprite/effect/fire/fire1.png.import new file mode 100644 index 0000000..706efdd --- /dev/null +++ b/resource/sprite/effect/fire/fire1.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/fire1.png-9157e69715657d6c4e7a7928690aea64.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/effect/fire/fire1.png" +dest_files=[ "res://.import/fire1.png-9157e69715657d6c4e7a7928690aea64.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/resource/sprite/effect/fire/fire2.png b/resource/sprite/effect/fire/fire2.png new file mode 100644 index 0000000..b496b6b --- /dev/null +++ b/resource/sprite/effect/fire/fire2.png Binary files differ diff --git a/resource/sprite/effect/fire/fire2.png.import b/resource/sprite/effect/fire/fire2.png.import new file mode 100644 index 0000000..f2645fd --- /dev/null +++ b/resource/sprite/effect/fire/fire2.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/fire2.png-cfe4f0158a6bbc63fff15fa1cf1ac348.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/effect/fire/fire2.png" +dest_files=[ "res://.import/fire2.png-cfe4f0158a6bbc63fff15fa1cf1ac348.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/resource/sprite/effect/fire/fire3.png b/resource/sprite/effect/fire/fire3.png new file mode 100644 index 0000000..d51825b --- /dev/null +++ b/resource/sprite/effect/fire/fire3.png Binary files differ diff --git a/resource/sprite/effect/fire/fire3.png.import b/resource/sprite/effect/fire/fire3.png.import new file mode 100644 index 0000000..4d2b4fc --- /dev/null +++ b/resource/sprite/effect/fire/fire3.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/fire3.png-c4546af8de7681c2b4ff9b8c644c077b.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/effect/fire/fire3.png" +dest_files=[ "res://.import/fire3.png-c4546af8de7681c2b4ff9b8c644c077b.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/resource/sprite/package/itch-io-pixel-battle-effects/Effect 1 - Sprite Sheet.png b/resource/sprite/package/itch-io-pixel-battle-effects/Effect 1 - Sprite Sheet.png new file mode 100644 index 0000000..92a0442 --- /dev/null +++ b/resource/sprite/package/itch-io-pixel-battle-effects/Effect 1 - Sprite Sheet.png Binary files differ diff --git a/resource/sprite/package/itch-io-pixel-battle-effects/Effect 1 - Sprite Sheet.png.import b/resource/sprite/package/itch-io-pixel-battle-effects/Effect 1 - Sprite Sheet.png.import new file mode 100644 index 0000000..ec01f15 --- /dev/null +++ b/resource/sprite/package/itch-io-pixel-battle-effects/Effect 1 - Sprite Sheet.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Effect 1 - Sprite Sheet.png-cea2bf576dab2be1bad9688d74da2102.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/package/itch-io-pixel-battle-effects/Effect 1 - Sprite Sheet.png" +dest_files=[ "res://.import/Effect 1 - Sprite Sheet.png-cea2bf576dab2be1bad9688d74da2102.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/resource/sprite/package/itch-io-pixel-battle-effects/Effect 2 - Sprite Sheet.png b/resource/sprite/package/itch-io-pixel-battle-effects/Effect 2 - Sprite Sheet.png new file mode 100644 index 0000000..22ca629 --- /dev/null +++ b/resource/sprite/package/itch-io-pixel-battle-effects/Effect 2 - Sprite Sheet.png Binary files differ diff --git a/resource/sprite/package/itch-io-pixel-battle-effects/Effect 2 - Sprite Sheet.png.import b/resource/sprite/package/itch-io-pixel-battle-effects/Effect 2 - Sprite Sheet.png.import new file mode 100644 index 0000000..e76c113 --- /dev/null +++ b/resource/sprite/package/itch-io-pixel-battle-effects/Effect 2 - Sprite Sheet.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Effect 2 - Sprite Sheet.png-5b5a88e5a36b1bcb30375d73ad3fce59.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/package/itch-io-pixel-battle-effects/Effect 2 - Sprite Sheet.png" +dest_files=[ "res://.import/Effect 2 - Sprite Sheet.png-5b5a88e5a36b1bcb30375d73ad3fce59.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/resource/sprite/package/itch-io-pixel-battle-effects/Effect 3 - Sprite Sheet.png b/resource/sprite/package/itch-io-pixel-battle-effects/Effect 3 - Sprite Sheet.png new file mode 100644 index 0000000..26158b5 --- /dev/null +++ b/resource/sprite/package/itch-io-pixel-battle-effects/Effect 3 - Sprite Sheet.png Binary files differ diff --git a/resource/sprite/package/itch-io-pixel-battle-effects/Effect 3 - Sprite Sheet.png.import b/resource/sprite/package/itch-io-pixel-battle-effects/Effect 3 - Sprite Sheet.png.import new file mode 100644 index 0000000..565019d --- /dev/null +++ b/resource/sprite/package/itch-io-pixel-battle-effects/Effect 3 - Sprite Sheet.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Effect 3 - Sprite Sheet.png-f26a99907897583990b5ba8413303d59.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/package/itch-io-pixel-battle-effects/Effect 3 - Sprite Sheet.png" +dest_files=[ "res://.import/Effect 3 - Sprite Sheet.png-f26a99907897583990b5ba8413303d59.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/resource/sprite/package/itch-io-pixel-battle-effects/Effect 4 - Sprite Sheet.png b/resource/sprite/package/itch-io-pixel-battle-effects/Effect 4 - Sprite Sheet.png new file mode 100644 index 0000000..4e8ebec --- /dev/null +++ b/resource/sprite/package/itch-io-pixel-battle-effects/Effect 4 - Sprite Sheet.png Binary files differ diff --git a/resource/sprite/package/itch-io-pixel-battle-effects/Effect 4 - Sprite Sheet.png.import b/resource/sprite/package/itch-io-pixel-battle-effects/Effect 4 - Sprite Sheet.png.import new file mode 100644 index 0000000..09e5af1 --- /dev/null +++ b/resource/sprite/package/itch-io-pixel-battle-effects/Effect 4 - Sprite Sheet.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Effect 4 - Sprite Sheet.png-db555cf3efd35352dcef6b28d03cf0c4.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/package/itch-io-pixel-battle-effects/Effect 4 - Sprite Sheet.png" +dest_files=[ "res://.import/Effect 4 - Sprite Sheet.png-db555cf3efd35352dcef6b28d03cf0c4.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/resource/sprite/package/itch-io-pixel-battle-effects/Effect1 Gameboy Spritesheet.png b/resource/sprite/package/itch-io-pixel-battle-effects/Effect1 Gameboy Spritesheet.png new file mode 100644 index 0000000..d24f9ea --- /dev/null +++ b/resource/sprite/package/itch-io-pixel-battle-effects/Effect1 Gameboy Spritesheet.png Binary files differ diff --git a/resource/sprite/package/itch-io-pixel-battle-effects/Effect1 Gameboy Spritesheet.png.import b/resource/sprite/package/itch-io-pixel-battle-effects/Effect1 Gameboy Spritesheet.png.import new file mode 100644 index 0000000..c1dae12 --- /dev/null +++ b/resource/sprite/package/itch-io-pixel-battle-effects/Effect1 Gameboy Spritesheet.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Effect1 Gameboy Spritesheet.png-d78f0c281c1b2234b16ffb1cb3fa4a44.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/package/itch-io-pixel-battle-effects/Effect1 Gameboy Spritesheet.png" +dest_files=[ "res://.import/Effect1 Gameboy Spritesheet.png-d78f0c281c1b2234b16ffb1cb3fa4a44.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/resource/sprite/package/itch-io-pixel-battle-effects/Effect3 Gameboy Spritesheet.png b/resource/sprite/package/itch-io-pixel-battle-effects/Effect3 Gameboy Spritesheet.png new file mode 100644 index 0000000..948f427 --- /dev/null +++ b/resource/sprite/package/itch-io-pixel-battle-effects/Effect3 Gameboy Spritesheet.png Binary files differ diff --git a/resource/sprite/package/itch-io-pixel-battle-effects/Effect3 Gameboy Spritesheet.png.import b/resource/sprite/package/itch-io-pixel-battle-effects/Effect3 Gameboy Spritesheet.png.import new file mode 100644 index 0000000..f6d4414 --- /dev/null +++ b/resource/sprite/package/itch-io-pixel-battle-effects/Effect3 Gameboy Spritesheet.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Effect3 Gameboy Spritesheet.png-03385f7707a3c62fb8cba0c990d78d52.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/package/itch-io-pixel-battle-effects/Effect3 Gameboy Spritesheet.png" +dest_files=[ "res://.import/Effect3 Gameboy Spritesheet.png-03385f7707a3c62fb8cba0c990d78d52.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/resource/sprite/package/itch-io-pixel-battle-effects/Effect4 Gameboy Spritesheet.png b/resource/sprite/package/itch-io-pixel-battle-effects/Effect4 Gameboy Spritesheet.png new file mode 100644 index 0000000..7e81424 --- /dev/null +++ b/resource/sprite/package/itch-io-pixel-battle-effects/Effect4 Gameboy Spritesheet.png Binary files differ diff --git a/resource/sprite/package/itch-io-pixel-battle-effects/Effect4 Gameboy Spritesheet.png.import b/resource/sprite/package/itch-io-pixel-battle-effects/Effect4 Gameboy Spritesheet.png.import new file mode 100644 index 0000000..6c4f167 --- /dev/null +++ b/resource/sprite/package/itch-io-pixel-battle-effects/Effect4 Gameboy Spritesheet.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Effect4 Gameboy Spritesheet.png-d956c077e872dfa01eec98b837fca939.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/package/itch-io-pixel-battle-effects/Effect4 Gameboy Spritesheet.png" +dest_files=[ "res://.import/Effect4 Gameboy Spritesheet.png-d956c077e872dfa01eec98b837fca939.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/resource/sprite/package/itch-io-pixel-battle-effects/Effectst2 Gameboy Spritesheet.png b/resource/sprite/package/itch-io-pixel-battle-effects/Effectst2 Gameboy Spritesheet.png new file mode 100644 index 0000000..01a154e --- /dev/null +++ b/resource/sprite/package/itch-io-pixel-battle-effects/Effectst2 Gameboy Spritesheet.png Binary files differ diff --git a/resource/sprite/package/itch-io-pixel-battle-effects/Effectst2 Gameboy Spritesheet.png.import b/resource/sprite/package/itch-io-pixel-battle-effects/Effectst2 Gameboy Spritesheet.png.import new file mode 100644 index 0000000..e6b606f --- /dev/null +++ b/resource/sprite/package/itch-io-pixel-battle-effects/Effectst2 Gameboy Spritesheet.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Effectst2 Gameboy Spritesheet.png-d088873c0f29ba2629a8958aa9e6e0b3.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/package/itch-io-pixel-battle-effects/Effectst2 Gameboy Spritesheet.png" +dest_files=[ "res://.import/Effectst2 Gameboy Spritesheet.png-d088873c0f29ba2629a8958aa9e6e0b3.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/resource/sprite/package/itch-io-pixel-battle-effects/website.txt b/resource/sprite/package/itch-io-pixel-battle-effects/website.txt new file mode 100644 index 0000000..84a24d0 --- /dev/null +++ b/resource/sprite/package/itch-io-pixel-battle-effects/website.txt @@ -0,0 +1 @@ +https://pimen.itch.io/pixel-battle-effects \ No newline at end of file diff --git a/src/gun/OrdinaryGun.cs b/src/gun/OrdinaryGun.cs index 047da0c..b99c584 100644 --- a/src/gun/OrdinaryGun.cs +++ b/src/gun/OrdinaryGun.cs @@ -5,6 +5,8 @@ /// public class OrdinaryGun : Gun { + [Export] public PackedScene FirePrefab; + //子弹 private PackedScene bulletPacked; @@ -33,6 +35,12 @@ var distance = MathUtils.RandRange(Attribute.MinDistance, Attribute.MaxDistance); //初始化子弹数据 bullet.InitData(distance, Colors.White); + + //枪口火焰 + Node2D hit = FirePrefab.Instance(); + hit.GlobalRotationDegrees = GlobalRotationDegrees; + hit.GlobalPosition = FirePoint.GlobalPosition; + GetTree().CurrentScene.AddChild(hit); } protected T CreateBullet(PackedScene bulletPack) where T : Bullet diff --git a/src/role/Player.cs b/src/role/Player.cs index 0433346..9cc0538 100644 --- a/src/role/Player.cs +++ b/src/role/Player.cs @@ -52,7 +52,7 @@ //抬起角度 attr.UpliftAngle = 10; //枪身长度 - attr.FirePosition = new Vector2(15, 1.5f); + attr.FirePosition = new Vector2(16, 1.5f); attr.Sprite = "res://resource/sprite/gun/gun4.png"; gun.Init(attr); gun.FireEvent += FireEvent_Func;