Reworked weapons and projectiles
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
||||
class_name ShrapnelProjectile
|
||||
extends DirectHitProjectile
|
||||
class_name AbstractShrapnelProjectile
|
||||
extends AbstractDirectHitProjectile
|
||||
|
||||
|
||||
@export var max_distance : int
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://bsx23u3a2obbj"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cdv5n4t47hr8i" path="res://game/entities/weapons/direct_hit__projectile.tscn" id="1_yu2c6"]
|
||||
[ext_resource type="Script" uid="uid://ctnje7pjanaws" path="res://game/entities/weapons/shrapnel/shrapnel_projectile.gd" id="2_2jiy6"]
|
||||
[ext_resource type="Script" uid="uid://bhqvk5cnjg5mv" path="res://game/health_system/damage/kinetic_damage.gd" id="3_kj16s"]
|
||||
[ext_resource type="PackedScene" uid="uid://cdv5n4t47hr8i" path="res://game/entities/weapons/abstract_direct_hit_projectile.tscn" id="1_yu2c6"]
|
||||
[ext_resource type="Script" uid="uid://ctnje7pjanaws" path="res://game/entities/weapons/shrapnel/abstract_shrapnel_projectile.gd" id="2_2jiy6"]
|
||||
[ext_resource type="Script" uid="uid://bhqvk5cnjg5mv" path="res://game/data/damage/kinetic_damage.gd" id="3_kj16s"]
|
||||
[ext_resource type="Texture2D" uid="uid://oj86smpsipw4" path="res://images/projectiles.png" id="4_klguu"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_klguu"]
|
||||
@@ -17,7 +17,7 @@ region = Rect2(48, 0, 16, 16)
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_2jiy6"]
|
||||
radius = 1.0
|
||||
|
||||
[node name="ShrapnelProjectile" instance=ExtResource("1_yu2c6")]
|
||||
[node name="AbstractShrapnelProjectile" instance=ExtResource("1_yu2c6")]
|
||||
collision_layer = 0
|
||||
collision_mask = 0
|
||||
script = ExtResource("2_2jiy6")
|
||||
+5
-6
@@ -1,3 +1,4 @@
|
||||
class_name AbstractShrapnelWeapon
|
||||
extends AbstractWeapon
|
||||
|
||||
|
||||
@@ -7,16 +8,14 @@ extends AbstractWeapon
|
||||
@onready var shell_particles : GPUParticles2D = $ShellParticles
|
||||
|
||||
|
||||
func set_belonging(belonging: Belonging) -> void:
|
||||
super.set_belonging(belonging)
|
||||
|
||||
sprite.play(PREFIXES[_belonging] + IDLE_POSTFIX)
|
||||
func _ready() -> void:
|
||||
sprite.play(IDLE_ANIMATION)
|
||||
|
||||
|
||||
func shoot(ship_velocity: Vector2) -> bool:
|
||||
var is_shot := super.shoot(ship_velocity)
|
||||
if is_shot:
|
||||
sprite.play(PREFIXES[_belonging] + SHOT_POSTFIX)
|
||||
sprite.play(SHOT_ANIMATION)
|
||||
_can_shoot = false
|
||||
cooldown_timer.start()
|
||||
shot_particles.restart()
|
||||
@@ -26,7 +25,7 @@ func shoot(ship_velocity: Vector2) -> bool:
|
||||
|
||||
|
||||
func _on_animated_sprite_2d_animation_finished() -> void:
|
||||
sprite.play(PREFIXES[_belonging] + IDLE_POSTFIX)
|
||||
sprite.play(IDLE_ANIMATION)
|
||||
|
||||
|
||||
func _on_cooldown_timer_timeout() -> void:
|
||||
@@ -0,0 +1,65 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://r7wnk762jbfy"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://1o2ta17yc5bp" path="res://game/entities/weapons/abstract_weapon.tscn" id="1_xk300"]
|
||||
[ext_resource type="Script" uid="uid://gxwbsiicuqh5" path="res://game/entities/weapons/shrapnel/abstract_shrapnel_weapon.gd" id="2_1bd18"]
|
||||
[ext_resource type="Texture2D" uid="uid://b2tpy3y2bpuat" path="res://particle_textures/flame_small.tres" id="4_0tw2i"]
|
||||
[ext_resource type="Texture2D" uid="uid://dxcxybr27kkra" path="res://particle_textures/shell_medium.tres" id="6_gdolk"]
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_a22j7"]
|
||||
resource_local_to_scene = true
|
||||
lifetime_randomness = 0.5
|
||||
particle_flag_disable_z = true
|
||||
emission_shape = 1
|
||||
emission_sphere_radius = 2.0
|
||||
angle_min = -179.99998
|
||||
angle_max = 180.00002
|
||||
inherit_velocity_ratio = 0.5
|
||||
spread = 60.0
|
||||
initial_velocity_min = 10.0
|
||||
initial_velocity_max = 15.0
|
||||
gravity = Vector3(0, 0, 0)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_asm6v"]
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_t57yr"]
|
||||
resource_local_to_scene = true
|
||||
particle_flag_disable_z = true
|
||||
inherit_velocity_ratio = 0.5
|
||||
direction = Vector3(0, 1, 0)
|
||||
spread = 15.0
|
||||
initial_velocity_min = 15.0
|
||||
initial_velocity_max = 25.0
|
||||
gravity = Vector3(0, 0, 0)
|
||||
|
||||
[node name="AbstractShrapnelWeapon" instance=ExtResource("1_xk300")]
|
||||
script = ExtResource("2_1bd18")
|
||||
bullet_per_shot = 20
|
||||
sector_angle = 30
|
||||
type = 1
|
||||
|
||||
[node name="ShotParticles" type="GPUParticles2D" parent="." index="0"]
|
||||
emitting = false
|
||||
amount = 32
|
||||
texture = ExtResource("4_0tw2i")
|
||||
lifetime = 0.3
|
||||
one_shot = true
|
||||
process_material = SubResource("ParticleProcessMaterial_a22j7")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." index="1"]
|
||||
sprite_frames = SubResource("SpriteFrames_asm6v")
|
||||
|
||||
[node name="ShellParticles" type="GPUParticles2D" parent="." index="2"]
|
||||
z_index = 1
|
||||
emitting = false
|
||||
amount = 15
|
||||
texture = ExtResource("6_gdolk")
|
||||
lifetime = 3.0
|
||||
one_shot = true
|
||||
process_material = SubResource("ParticleProcessMaterial_t57yr")
|
||||
|
||||
[node name="CooldownTimer" type="Timer" parent="." index="3"]
|
||||
wait_time = 0.6
|
||||
one_shot = true
|
||||
|
||||
[connection signal="animation_finished" from="AnimatedSprite2D" to="." method="_on_animated_sprite_2d_animation_finished"]
|
||||
[connection signal="timeout" from="CooldownTimer" to="." method="_on_cooldown_timer_timeout"]
|
||||
@@ -0,0 +1,2 @@
|
||||
class_name EnemyShrapnelProjectile
|
||||
extends AbstractShrapnelProjectile
|
||||
@@ -0,0 +1 @@
|
||||
uid://c803i8oaj4dgp
|
||||
@@ -0,0 +1,10 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://bmusx2hpk7m76"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://bsx23u3a2obbj" path="res://game/entities/weapons/shrapnel/abstract_shrapnel_projectile.tscn" id="1_6xicu"]
|
||||
[ext_resource type="Script" uid="uid://c803i8oaj4dgp" path="res://game/entities/weapons/shrapnel/enemy_shrapnel_projectile.gd" id="2_ir0ih"]
|
||||
|
||||
[node name="EnemyShrapnelProjectile" instance=ExtResource("1_6xicu")]
|
||||
collision_layer = 16
|
||||
collision_mask = 2
|
||||
script = ExtResource("2_ir0ih")
|
||||
direction = Vector2(-1, 0)
|
||||
@@ -0,0 +1,2 @@
|
||||
class_name EnemyShrapnelWeapon
|
||||
extends AbstractShrapnelWeapon
|
||||
@@ -0,0 +1 @@
|
||||
uid://d30syotjwdwlu
|
||||
@@ -0,0 +1,92 @@
|
||||
[gd_scene load_steps=12 format=3 uid="uid://df816hasxkglk"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://r7wnk762jbfy" path="res://game/entities/weapons/shrapnel/abstract_shrapnel_weapon.tscn" id="1_1p630"]
|
||||
[ext_resource type="Script" uid="uid://d30syotjwdwlu" path="res://game/entities/weapons/shrapnel/enemy_shrapnel_weapon.gd" id="2_ttncl"]
|
||||
[ext_resource type="PackedScene" uid="uid://bmusx2hpk7m76" path="res://game/entities/weapons/shrapnel/enemy_shrapnel_projectile.tscn" id="3_p5apf"]
|
||||
[ext_resource type="Texture2D" uid="uid://6hh66k8s4a1e" path="res://images/weapons.png" id="4_ctn2a"]
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_ctn2a"]
|
||||
resource_local_to_scene = true
|
||||
lifetime_randomness = 0.5
|
||||
particle_flag_disable_z = true
|
||||
emission_shape = 1
|
||||
emission_sphere_radius = 2.0
|
||||
angle_min = -179.99998
|
||||
angle_max = 180.00002
|
||||
inherit_velocity_ratio = 0.5
|
||||
direction = Vector3(-1, 0, 0)
|
||||
spread = 60.0
|
||||
initial_velocity_min = 10.0
|
||||
initial_velocity_max = 15.0
|
||||
gravity = Vector3(0, 0, 0)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_gdolk"]
|
||||
atlas = ExtResource("4_ctn2a")
|
||||
region = Rect2(128, 48, 32, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_a22j7"]
|
||||
atlas = ExtResource("4_ctn2a")
|
||||
region = Rect2(160, 48, 32, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_t57yr"]
|
||||
atlas = ExtResource("4_ctn2a")
|
||||
region = Rect2(192, 48, 32, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_cogj5"]
|
||||
atlas = ExtResource("4_ctn2a")
|
||||
region = Rect2(224, 48, 32, 16)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_fcnom"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_gdolk")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle",
|
||||
"speed": 10.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_a22j7")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_t57yr")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_cogj5")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"shot",
|
||||
"speed": 10.0
|
||||
}]
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_fcnom"]
|
||||
resource_local_to_scene = true
|
||||
particle_flag_disable_z = true
|
||||
inherit_velocity_ratio = 0.5
|
||||
direction = Vector3(0, -1, 0)
|
||||
spread = 5.0
|
||||
initial_velocity_min = 15.0
|
||||
initial_velocity_max = 25.0
|
||||
gravity = Vector3(0, 0, 0)
|
||||
|
||||
[node name="EnemyShrapnelWeapon" instance=ExtResource("1_1p630")]
|
||||
script = ExtResource("2_ttncl")
|
||||
projectile_scene = ExtResource("3_p5apf")
|
||||
|
||||
[node name="ShotParticles" parent="." index="0"]
|
||||
position = Vector2(-18, 0)
|
||||
process_material = SubResource("ParticleProcessMaterial_ctn2a")
|
||||
|
||||
[node name="AnimatedSprite2D" parent="." index="1"]
|
||||
position = Vector2(-7, 0)
|
||||
sprite_frames = SubResource("SpriteFrames_fcnom")
|
||||
animation = &"idle"
|
||||
|
||||
[node name="ShellParticles" parent="." index="2"]
|
||||
position = Vector2(0, -3)
|
||||
process_material = SubResource("ParticleProcessMaterial_fcnom")
|
||||
|
||||
[node name="Muzzle" parent="." index="4"]
|
||||
position = Vector2(-14, 0)
|
||||
@@ -0,0 +1,2 @@
|
||||
class_name PlayerShrapnelProjectile
|
||||
extends AbstractShrapnelProjectile
|
||||
@@ -0,0 +1 @@
|
||||
uid://cfngvotdmb1fj
|
||||
@@ -0,0 +1,10 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://cswhydwmia3fh"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://bsx23u3a2obbj" path="res://game/entities/weapons/shrapnel/abstract_shrapnel_projectile.tscn" id="1_q8vdx"]
|
||||
[ext_resource type="Script" uid="uid://cfngvotdmb1fj" path="res://game/entities/weapons/shrapnel/player_shrapnel_projectile.gd" id="2_3sxqk"]
|
||||
|
||||
[node name="PlayerShrapnelProjectile" instance=ExtResource("1_q8vdx")]
|
||||
collision_layer = 8
|
||||
collision_mask = 4
|
||||
script = ExtResource("2_3sxqk")
|
||||
direction = Vector2(1, 0)
|
||||
@@ -0,0 +1,2 @@
|
||||
class_name PlayerShrapnelWeapon
|
||||
extends AbstractShrapnelWeapon
|
||||
@@ -0,0 +1 @@
|
||||
uid://b4nr6mwn11xx6
|
||||
@@ -0,0 +1,91 @@
|
||||
[gd_scene load_steps=12 format=3 uid="uid://cvtwks2ooetxp"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://r7wnk762jbfy" path="res://game/entities/weapons/shrapnel/abstract_shrapnel_weapon.tscn" id="1_fhgjq"]
|
||||
[ext_resource type="Script" uid="uid://b4nr6mwn11xx6" path="res://game/entities/weapons/shrapnel/player_shrapnel_weapon.gd" id="2_kcdeu"]
|
||||
[ext_resource type="PackedScene" uid="uid://cswhydwmia3fh" path="res://game/entities/weapons/shrapnel/player_shrapnel_projectile.tscn" id="3_kcdeu"]
|
||||
[ext_resource type="Texture2D" uid="uid://6hh66k8s4a1e" path="res://images/weapons.png" id="4_kupqk"]
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_kcdeu"]
|
||||
resource_local_to_scene = true
|
||||
lifetime_randomness = 0.5
|
||||
particle_flag_disable_z = true
|
||||
emission_shape = 1
|
||||
emission_sphere_radius = 2.0
|
||||
angle_min = -179.99998
|
||||
angle_max = 180.00002
|
||||
inherit_velocity_ratio = 0.5
|
||||
spread = 60.0
|
||||
initial_velocity_min = 10.0
|
||||
initial_velocity_max = 15.0
|
||||
gravity = Vector3(0, 0, 0)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_t4pcy"]
|
||||
atlas = ExtResource("4_kupqk")
|
||||
region = Rect2(128, 32, 32, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_25rnd"]
|
||||
atlas = ExtResource("4_kupqk")
|
||||
region = Rect2(160, 32, 32, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_02grq"]
|
||||
atlas = ExtResource("4_kupqk")
|
||||
region = Rect2(192, 32, 32, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_6pv2s"]
|
||||
atlas = ExtResource("4_kupqk")
|
||||
region = Rect2(224, 32, 32, 16)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_867ok"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_t4pcy")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle",
|
||||
"speed": 10.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_25rnd")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_02grq")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_6pv2s")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"shot",
|
||||
"speed": 10.0
|
||||
}]
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_kupqk"]
|
||||
resource_local_to_scene = true
|
||||
particle_flag_disable_z = true
|
||||
inherit_velocity_ratio = 0.5
|
||||
direction = Vector3(0, 1, 0)
|
||||
spread = 5.0
|
||||
initial_velocity_min = 15.0
|
||||
initial_velocity_max = 25.0
|
||||
gravity = Vector3(0, 0, 0)
|
||||
|
||||
[node name="PlayerShrapnelWeapon" instance=ExtResource("1_fhgjq")]
|
||||
script = ExtResource("2_kcdeu")
|
||||
projectile_scene = ExtResource("3_kcdeu")
|
||||
|
||||
[node name="ShotParticles" parent="." index="0"]
|
||||
position = Vector2(18, 0)
|
||||
process_material = SubResource("ParticleProcessMaterial_kcdeu")
|
||||
|
||||
[node name="AnimatedSprite2D" parent="." index="1"]
|
||||
position = Vector2(7, 0)
|
||||
sprite_frames = SubResource("SpriteFrames_867ok")
|
||||
animation = &"idle"
|
||||
|
||||
[node name="ShellParticles" parent="." index="2"]
|
||||
position = Vector2(-1, 1)
|
||||
process_material = SubResource("ParticleProcessMaterial_kupqk")
|
||||
|
||||
[node name="Muzzle" parent="." index="4"]
|
||||
position = Vector2(14, 0)
|
||||
@@ -1,17 +0,0 @@
|
||||
[gd_resource type="Resource" script_class="WeaponData" load_steps=3 format=3 uid="uid://d1kc2gvye2f28"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://r7wnk762jbfy" path="res://game/entities/weapons/shrapnel/shrapnel_weapon.tscn" id="1_8lpql"]
|
||||
[ext_resource type="Script" uid="uid://870r1efinhqd" path="res://game/world/data/weapon_data.gd" id="1_xds2o"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_xds2o")
|
||||
id = "shrapnel"
|
||||
name = "Shrapnel"
|
||||
group = "kinetic"
|
||||
description = "High damage (kinetic)
|
||||
Moderate firerate
|
||||
Moderate velocity
|
||||
Short range
|
||||
Multiple projectiles"
|
||||
scene = ExtResource("1_8lpql")
|
||||
metadata/_custom_type_script = "uid://870r1efinhqd"
|
||||
@@ -1,152 +0,0 @@
|
||||
[gd_scene load_steps=18 format=3 uid="uid://r7wnk762jbfy"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://1o2ta17yc5bp" path="res://game/entities/weapons/abstract_weapon.tscn" id="1_xk300"]
|
||||
[ext_resource type="Script" uid="uid://gxwbsiicuqh5" path="res://game/entities/weapons/shrapnel/shrapnel_weapon.gd" id="2_1bd18"]
|
||||
[ext_resource type="PackedScene" uid="uid://bsx23u3a2obbj" path="res://game/entities/weapons/shrapnel/shrapnel_projectile.tscn" id="2_xvd4y"]
|
||||
[ext_resource type="Texture2D" uid="uid://b2tpy3y2bpuat" path="res://particle_textures/flame_small.tres" id="4_0tw2i"]
|
||||
[ext_resource type="Texture2D" uid="uid://6hh66k8s4a1e" path="res://images/weapons.png" id="6_0tw2i"]
|
||||
[ext_resource type="Texture2D" uid="uid://dxcxybr27kkra" path="res://particle_textures/shell_medium.tres" id="6_gdolk"]
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_a22j7"]
|
||||
resource_local_to_scene = true
|
||||
lifetime_randomness = 0.5
|
||||
particle_flag_disable_z = true
|
||||
emission_shape = 1
|
||||
emission_sphere_radius = 2.0
|
||||
angle_min = -179.99998
|
||||
angle_max = 180.00002
|
||||
inherit_velocity_ratio = 0.5
|
||||
spread = 60.0
|
||||
initial_velocity_min = 10.0
|
||||
initial_velocity_max = 15.0
|
||||
gravity = Vector3(0, 0, 0)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_gdolk"]
|
||||
atlas = ExtResource("6_0tw2i")
|
||||
region = Rect2(128, 48, 32, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_a22j7"]
|
||||
atlas = ExtResource("6_0tw2i")
|
||||
region = Rect2(160, 48, 32, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_t57yr"]
|
||||
atlas = ExtResource("6_0tw2i")
|
||||
region = Rect2(192, 48, 32, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_cogj5"]
|
||||
atlas = ExtResource("6_0tw2i")
|
||||
region = Rect2(224, 48, 32, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_t4pcy"]
|
||||
atlas = ExtResource("6_0tw2i")
|
||||
region = Rect2(128, 32, 32, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_25rnd"]
|
||||
atlas = ExtResource("6_0tw2i")
|
||||
region = Rect2(160, 32, 32, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_02grq"]
|
||||
atlas = ExtResource("6_0tw2i")
|
||||
region = Rect2(192, 32, 32, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_6pv2s"]
|
||||
atlas = ExtResource("6_0tw2i")
|
||||
region = Rect2(224, 32, 32, 16)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_he4pe"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_gdolk")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"enemy_idle",
|
||||
"speed": 10.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_a22j7")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_t57yr")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_cogj5")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"enemy_shot",
|
||||
"speed": 10.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_t4pcy")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"player_idle",
|
||||
"speed": 10.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_25rnd")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_02grq")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_6pv2s")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"player_shot",
|
||||
"speed": 10.0
|
||||
}]
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_t57yr"]
|
||||
resource_local_to_scene = true
|
||||
particle_flag_disable_z = true
|
||||
inherit_velocity_ratio = 0.5
|
||||
direction = Vector3(0, 1, 0)
|
||||
spread = 15.0
|
||||
initial_velocity_min = 15.0
|
||||
initial_velocity_max = 25.0
|
||||
gravity = Vector3(0, 0, 0)
|
||||
|
||||
[node name="ShrapnelWeapon" instance=ExtResource("1_xk300")]
|
||||
script = ExtResource("2_1bd18")
|
||||
bullet_per_shot = 20
|
||||
sector_angle = 30
|
||||
Projectile = ExtResource("2_xvd4y")
|
||||
type = 1
|
||||
|
||||
[node name="ShotParticles" type="GPUParticles2D" parent="." index="0"]
|
||||
position = Vector2(17, 0)
|
||||
emitting = false
|
||||
amount = 32
|
||||
texture = ExtResource("4_0tw2i")
|
||||
lifetime = 0.3
|
||||
one_shot = true
|
||||
process_material = SubResource("ParticleProcessMaterial_a22j7")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." index="1"]
|
||||
position = Vector2(7, 0)
|
||||
sprite_frames = SubResource("SpriteFrames_he4pe")
|
||||
animation = &"player_shot"
|
||||
|
||||
[node name="ShellParticles" type="GPUParticles2D" parent="." index="2"]
|
||||
z_index = 1
|
||||
position = Vector2(-1, 1)
|
||||
emitting = false
|
||||
amount = 15
|
||||
texture = ExtResource("6_gdolk")
|
||||
lifetime = 3.0
|
||||
one_shot = true
|
||||
process_material = SubResource("ParticleProcessMaterial_t57yr")
|
||||
|
||||
[node name="CooldownTimer" type="Timer" parent="." index="3"]
|
||||
wait_time = 0.6
|
||||
one_shot = true
|
||||
|
||||
[node name="Muzzle" parent="." index="4"]
|
||||
position = Vector2(14, 0)
|
||||
|
||||
[connection signal="animation_finished" from="AnimatedSprite2D" to="." method="_on_animated_sprite_2d_animation_finished"]
|
||||
[connection signal="timeout" from="CooldownTimer" to="." method="_on_cooldown_timer_timeout"]
|
||||
Reference in New Issue
Block a user