Refinded symetrical fire functionality and updated stock weapon art.
This commit is contained in:
parent
c91f8ab31d
commit
1bce6ca268
6 changed files with 82 additions and 12 deletions
BIN
graphics/shot_stock.png
Normal file
BIN
graphics/shot_stock.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 297 B |
40
graphics/shot_stock.png.import
Normal file
40
graphics/shot_stock.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dolmy8bnc8kkt"
|
||||
path="res://.godot/imported/shot_stock.png-7b8166fc7d450fe427fb3181154c3018.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://graphics/shot_stock.png"
|
||||
dest_files=["res://.godot/imported/shot_stock.png-7b8166fc7d450fe427fb3181154c3018.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
|
@ -8,9 +8,9 @@ script = ExtResource("2_by0nb")
|
|||
shot_name = "Stock Shot"
|
||||
bullet_scene = ExtResource("1_by0nb")
|
||||
speed = 500
|
||||
projectiles = 5
|
||||
projectiles = 3
|
||||
spacing = 25.0
|
||||
origin = -10
|
||||
horizontal_offset = 6.0
|
||||
stagger_offset = 0.25
|
||||
origin = -12
|
||||
horizontal_offset = 8.0
|
||||
stagger_offset = 0.35
|
||||
metadata/_custom_type_script = "uid://7n1itonn35fm"
|
||||
|
|
|
|||
|
|
@ -108,11 +108,11 @@ autoplay = "fwd"
|
|||
|
||||
[node name="MuzzleFlash" type="AnimatedSprite2D" parent="Ship" unique_id=1584132038]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
position = Vector2(0.5, -16)
|
||||
sprite_frames = SubResource("SpriteFrames_3v2ag")
|
||||
animation = &"stock"
|
||||
autoplay = "stock"
|
||||
speed_scale = 1.75
|
||||
|
||||
[node name="MuzzleBox" type="CollisionShape2D" parent="." unique_id=1042837273]
|
||||
unique_name_in_owner = true
|
||||
|
|
|
|||
|
|
@ -1,18 +1,48 @@
|
|||
[gd_scene format=3 uid="uid://ddpclu2vdy2ve"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c5blhfopjpfny" path="res://scenes/weapon_stock.gd" id="1_u1d5o"]
|
||||
[ext_resource type="Texture2D" uid="uid://ti1uy42vnnhw" path="res://graphics/shot.png" id="2_5bykt"]
|
||||
[ext_resource type="Texture2D" uid="uid://dolmy8bnc8kkt" path="res://graphics/shot_stock.png" id="2_u1d5o"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5bykt"]
|
||||
atlas = ExtResource("2_u1d5o")
|
||||
region = Rect2(0, 0, 7, 11)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_vsqoq"]
|
||||
atlas = ExtResource("2_u1d5o")
|
||||
region = Rect2(7, 0, 7, 11)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_yqx5m"]
|
||||
atlas = ExtResource("2_u1d5o")
|
||||
region = Rect2(14, 0, 7, 11)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_fdubj"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_5bykt")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_vsqoq")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_yqx5m")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 24.0
|
||||
}]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_mvdrj"]
|
||||
size = Vector2(6, 14)
|
||||
size = Vector2(6.666667, 14)
|
||||
|
||||
[node name="StockWeapon" type="Area2D" unique_id=1832200900]
|
||||
script = ExtResource("1_u1d5o")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=2134507225]
|
||||
texture = ExtResource("2_5bykt")
|
||||
region_enabled = true
|
||||
region_rect = Rect2(7, 6, 4, 12)
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=1831184252]
|
||||
scale = Vector2(1.5, 1.5)
|
||||
sprite_frames = SubResource("SpriteFrames_fdubj")
|
||||
autoplay = "default"
|
||||
frame_progress = 0.35886022
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1890946059]
|
||||
shape = SubResource("RectangleShape2D_mvdrj")
|
||||
|
|
|
|||
|
|
@ -42,5 +42,5 @@ func shoot():
|
|||
bullet.time_offset = time_offset
|
||||
bullet.fire_time = current_time + time_offset
|
||||
|
||||
# Subtract projectile spacing from current Player travel for next
|
||||
# Subtract projectile spacing from current Player travel for next shot
|
||||
player.travel -= weapon_data.spacing
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue