Grenade explosion.
This commit is contained in:
parent
ce2d337256
commit
98f59389ef
5 changed files with 1887 additions and 52 deletions
BIN
Game/Assets/Effects/ExplosionFlames.png
Normal file
BIN
Game/Assets/Effects/ExplosionFlames.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 369 KiB |
36
Game/Assets/Effects/ExplosionFlames.png.import
Normal file
36
Game/Assets/Effects/ExplosionFlames.png.import
Normal file
|
@ -0,0 +1,36 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path.s3tc="res://.import/ExplosionFlames.png-742a7ec019a4639c7e006fa5a2759fd6.s3tc.stex"
|
||||
path.etc2="res://.import/ExplosionFlames.png-742a7ec019a4639c7e006fa5a2759fd6.etc2.stex"
|
||||
metadata={
|
||||
"imported_formats": [ "s3tc", "etc2" ],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Effects/ExplosionFlames.png"
|
||||
dest_files=[ "res://.import/ExplosionFlames.png-742a7ec019a4639c7e006fa5a2759fd6.s3tc.stex", "res://.import/ExplosionFlames.png-742a7ec019a4639c7e006fa5a2759fd6.etc2.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=true
|
||||
flags/filter=true
|
||||
flags/mipmaps=true
|
||||
flags/anisotropic=false
|
||||
flags/srgb=1
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
1732
Game/Assets/Effects/ExplosionFlames.ptex
Normal file
1732
Game/Assets/Effects/ExplosionFlames.ptex
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=33 format=2]
|
||||
[gd_scene load_steps=38 format=2]
|
||||
|
||||
[ext_resource path="res://Assets/Effects/CircleHard.svg" type="Texture" id=1]
|
||||
[ext_resource path="res://Assets/Effects/CircleSoft.svg" type="Texture" id=2]
|
||||
|
@ -7,6 +7,7 @@
|
|||
[ext_resource path="res://Assets/Effects/Bullet Holes/4x4 Decal Sheet.glb" type="PackedScene" id=5]
|
||||
[ext_resource path="res://Assets/Effects/Bullet Holes/Concrete.tres" type="Material" id=6]
|
||||
[ext_resource path="res://Assets/Effects/Bullet Holes/4x4 Decal Sheet.gd" type="Script" id=7]
|
||||
[ext_resource path="res://Assets/Effects/ExplosionFlames.png" type="Texture" id=8]
|
||||
|
||||
[sub_resource type="Animation" id=1]
|
||||
resource_name = "Effect"
|
||||
|
@ -17,7 +18,7 @@ tracks/0/path = NodePath("Hit:scale")
|
|||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/enabled = false
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 0.05, 0.9 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1 ),
|
||||
|
@ -25,7 +26,7 @@ tracks/0/keys = {
|
|||
"values": [ Vector3( 2, 2, 2 ), Vector3( 1, 1, 1 ), Vector3( 0, 0, 0 ) ]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/path = NodePath("ParticlesFire:emitting")
|
||||
tracks/1/path = NodePath("ParticlesBlast:emitting")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/imported = false
|
||||
|
@ -60,6 +61,30 @@ tracks/3/keys = {
|
|||
"update": 1,
|
||||
"values": [ true ]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/path = NodePath("OmniLight:light_color")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/keys = {
|
||||
"times": PoolRealArray( 0, 0.05, 0.2, 0.65 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1, 1 ),
|
||||
"update": 0,
|
||||
"values": [ Color( 1, 0.984314, 0.592157, 1 ), Color( 1, 0.784314, 0.0509804, 1 ), Color( 0.356863, 0.207843, 0.0156863, 1 ), Color( 0, 0, 0, 1 ) ]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/path = NodePath("ParticlesFire:emitting")
|
||||
tracks/5/interp = 1
|
||||
tracks/5/loop_wrap = true
|
||||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/keys = {
|
||||
"times": PoolRealArray( 0 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"update": 1,
|
||||
"values": [ true ]
|
||||
}
|
||||
|
||||
[sub_resource type="SphereMesh" id=2]
|
||||
radius = 0.1
|
||||
|
@ -83,54 +108,85 @@ radial_segments = 10
|
|||
rings = 1
|
||||
|
||||
[sub_resource type="Gradient" id=6]
|
||||
offsets = PoolRealArray( 0, 0.0573394, 0.422018, 1 )
|
||||
colors = PoolColorArray( 3, 2.88, 2.07, 1, 0.986328, 0.741326, 0.127144, 1, 0.876953, 0.527703, 0.260345, 1, 0.0469799, 0.0469799, 0.0469799, 1 )
|
||||
offsets = PoolRealArray( 0, 0.0550459, 0.206422, 1 )
|
||||
colors = PoolColorArray( 3, 2.88, 2.07, 1, 0.986328, 0.741326, 0.127144, 1, 0.876953, 0.527703, 0.260345, 1, 0, 0, 0, 1 )
|
||||
|
||||
[sub_resource type="GradientTexture" id=7]
|
||||
gradient = SubResource( 6 )
|
||||
|
||||
[sub_resource type="Curve" id=8]
|
||||
_data = [ Vector2( 0, 1 ), 0.0, -0.386777, 0, 0, Vector2( 0.987179, 0 ), -0.127956, 0.0, 0, 0 ]
|
||||
[sub_resource type="Curve" id=33]
|
||||
max_value = 4.0
|
||||
_data = [ Vector2( 0, 0.164083 ), 0.0, 7.51091, 0, 0, Vector2( 0.980392, 4 ), -0.724165, 0.0, 0, 0 ]
|
||||
|
||||
[sub_resource type="CurveTexture" id=9]
|
||||
curve = SubResource( 8 )
|
||||
curve = SubResource( 33 )
|
||||
|
||||
[sub_resource type="ParticlesMaterial" id=10]
|
||||
[sub_resource type="ParticlesMaterial" id=28]
|
||||
lifetime_randomness = 0.9
|
||||
spread = 180.0
|
||||
initial_velocity = 25.0
|
||||
initial_velocity_random = 0.6
|
||||
damping = 79.08
|
||||
scale = 6.0
|
||||
gravity = Vector3( 0, 0, 0 )
|
||||
radial_accel = 0.07
|
||||
angle = 720.0
|
||||
angle_random = 1.0
|
||||
scale_random = 0.9
|
||||
scale_curve = SubResource( 9 )
|
||||
color_ramp = SubResource( 7 )
|
||||
|
||||
[sub_resource type="SpatialMaterial" id=11]
|
||||
[sub_resource type="SpatialMaterial" id=30]
|
||||
flags_transparent = true
|
||||
flags_unshaded = true
|
||||
vertex_color_use_as_albedo = true
|
||||
params_specular_mode = 4
|
||||
params_blend_mode = 1
|
||||
params_billboard_mode = 3
|
||||
params_use_alpha_scissor = true
|
||||
params_alpha_scissor_threshold = 0.5
|
||||
particles_anim_h_frames = 1
|
||||
particles_anim_v_frames = 1
|
||||
particles_anim_h_frames = 2
|
||||
particles_anim_v_frames = 2
|
||||
particles_anim_loop = false
|
||||
albedo_texture = ExtResource( 2 )
|
||||
albedo_color = Color( 3, 3, 3, 1 )
|
||||
albedo_texture = ExtResource( 8 )
|
||||
proximity_fade_enable = true
|
||||
proximity_fade_distance = 0.5
|
||||
|
||||
[sub_resource type="QuadMesh" id=12]
|
||||
material = SubResource( 11 )
|
||||
material = SubResource( 30 )
|
||||
|
||||
[sub_resource type="ParticlesMaterial" id=13]
|
||||
lifetime_randomness = 0.65
|
||||
initial_velocity = 7.0
|
||||
[sub_resource type="Gradient" id=31]
|
||||
offsets = PoolRealArray( 0.0183486, 0.0688073, 0.142202, 0.311927, 1 )
|
||||
colors = PoolColorArray( 1, 0.978706, 0.820312, 1, 1, 0.920414, 0.578125, 1, 1, 0.634504, 0.292969, 1, 0.333525, 0.149289, 0.0429934, 1, 0, 0, 0, 1 )
|
||||
|
||||
[sub_resource type="GradientTexture" id=32]
|
||||
gradient = SubResource( 31 )
|
||||
|
||||
[sub_resource type="ParticlesMaterial" id=34]
|
||||
lifetime_randomness = 0.2
|
||||
spread = 180.0
|
||||
gravity = Vector3( 0, 0, 0 )
|
||||
initial_velocity = 8.0
|
||||
initial_velocity_random = 0.6
|
||||
damping = 6.0
|
||||
damping = 32.64
|
||||
damping_random = 0.6
|
||||
angle = 720.0
|
||||
angle_random = 1.0
|
||||
scale_random = 0.9
|
||||
scale_curve = SubResource( 9 )
|
||||
color_ramp = SubResource( 32 )
|
||||
|
||||
[sub_resource type="SpatialMaterial" id=35]
|
||||
flags_transparent = true
|
||||
flags_unshaded = true
|
||||
vertex_color_use_as_albedo = true
|
||||
params_specular_mode = 4
|
||||
params_blend_mode = 1
|
||||
params_billboard_mode = 3
|
||||
particles_anim_h_frames = 2
|
||||
particles_anim_v_frames = 2
|
||||
particles_anim_loop = false
|
||||
albedo_texture = ExtResource( 8 )
|
||||
proximity_fade_enable = true
|
||||
proximity_fade_distance = 0.5
|
||||
|
||||
[sub_resource type="QuadMesh" id=36]
|
||||
material = SubResource( 35 )
|
||||
|
||||
[sub_resource type="Gradient" id=14]
|
||||
offsets = PoolRealArray( 0, 0.0346021, 0.083045, 0.49481, 1 )
|
||||
|
@ -139,11 +195,11 @@ colors = PoolColorArray( 1, 0.984375, 0.75, 1, 0.933594, 0.694326, 0.12764, 1, 0
|
|||
[sub_resource type="GradientTexture" id=15]
|
||||
gradient = SubResource( 14 )
|
||||
|
||||
[sub_resource type="ParticlesMaterial" id=16]
|
||||
[sub_resource type="ParticlesMaterial" id=27]
|
||||
lifetime_randomness = 0.8
|
||||
spread = 35.0
|
||||
initial_velocity = 14.0
|
||||
initial_velocity_random = 0.7
|
||||
spread = 180.0
|
||||
initial_velocity = 22.0
|
||||
initial_velocity_random = 0.3
|
||||
damping = 7.82
|
||||
damping_random = 0.92
|
||||
scale = 0.5
|
||||
|
@ -187,9 +243,8 @@ _data = [ Vector2( 0, 0.278253 ), 0.0, 1.12677, 0, 0, Vector2( 1, 1 ), 0.0, 0.0,
|
|||
curve = SubResource( 21 )
|
||||
|
||||
[sub_resource type="ParticlesMaterial" id=23]
|
||||
spread = 10.0
|
||||
spread = 180.0
|
||||
gravity = Vector3( 0, 0, 0 )
|
||||
initial_velocity = 4.0
|
||||
initial_velocity_random = 0.2
|
||||
angular_velocity = 395.12
|
||||
angular_velocity_random = 1.0
|
||||
|
@ -212,10 +267,11 @@ particles_anim_v_frames = 1
|
|||
particles_anim_loop = false
|
||||
albedo_texture = ExtResource( 2 )
|
||||
proximity_fade_enable = true
|
||||
proximity_fade_distance = 0.15
|
||||
proximity_fade_distance = 2.0
|
||||
|
||||
[sub_resource type="QuadMesh" id=25]
|
||||
material = SubResource( 24 )
|
||||
size = Vector2( 3, 3 )
|
||||
|
||||
[node name="BulletHit" type="Spatial"]
|
||||
|
||||
|
@ -224,18 +280,21 @@ autoplay = "Effect"
|
|||
anims/Effect = SubResource( 1 )
|
||||
|
||||
[node name="Hit" type="MeshInstance" parent="."]
|
||||
transform = Transform( 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0 )
|
||||
transform = Transform( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
|
||||
visible = false
|
||||
mesh = SubResource( 2 )
|
||||
material/0 = SubResource( 3 )
|
||||
|
||||
[node name="OmniLight" type="OmniLight" parent="."]
|
||||
transform = Transform( 1, 0, 0, 0, -1, -4.37114e-08, 0, 4.37114e-08, -1, 0, 0, 0 )
|
||||
light_color = Color( 1, 0.784314, 0.0509804, 1 )
|
||||
omni_range = 7.57563
|
||||
light_color = Color( 1, 0.984314, 0.592157, 1 )
|
||||
light_energy = 1.5
|
||||
shadow_enabled = true
|
||||
omni_range = 14.0
|
||||
|
||||
[node name="4x4 Decal Sheet" parent="." instance=ExtResource( 5 )]
|
||||
transform = Transform( 0.25, 0, 0, 0, 0.25, 0, 0, 0, 0.25, 0, 0.002, 0 )
|
||||
visible = false
|
||||
script = ExtResource( 7 )
|
||||
|
||||
[node name="Decal2" parent="4x4 Decal Sheet" index="0"]
|
||||
|
@ -260,43 +319,46 @@ visible = false
|
|||
mesh = SubResource( 5 )
|
||||
material/0 = null
|
||||
|
||||
[node name="ParticlesFire" type="Particles" parent="."]
|
||||
[node name="ParticlesBlast" type="Particles" parent="."]
|
||||
transform = Transform( -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0, 1, 0, 0, 0 )
|
||||
emitting = false
|
||||
amount = 64
|
||||
lifetime = 0.5
|
||||
explosiveness = 1.0
|
||||
local_coords = false
|
||||
process_material = SubResource( 10 )
|
||||
draw_pass_1 = SubResource( 12 )
|
||||
|
||||
[node name="ParticlesDust2" type="Particles" parent="."]
|
||||
transform = Transform( -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0, 1, 0, 0, 0 )
|
||||
visible = false
|
||||
emitting = false
|
||||
amount = 32
|
||||
amount = 3
|
||||
lifetime = 0.25
|
||||
one_shot = true
|
||||
explosiveness = 1.0
|
||||
local_coords = false
|
||||
process_material = SubResource( 13 )
|
||||
process_material = SubResource( 28 )
|
||||
draw_pass_1 = SubResource( 12 )
|
||||
|
||||
[node name="ParticlesFire" type="Particles" parent="."]
|
||||
transform = Transform( -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0, 1, 0, 0, 0 )
|
||||
emitting = false
|
||||
amount = 16
|
||||
lifetime = 0.75
|
||||
one_shot = true
|
||||
explosiveness = 1.0
|
||||
local_coords = false
|
||||
process_material = SubResource( 34 )
|
||||
draw_pass_1 = SubResource( 36 )
|
||||
|
||||
[node name="ParticlesSparks" type="Particles" parent="."]
|
||||
transform = Transform( -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0, 1, 0, 0, 0 )
|
||||
visible = false
|
||||
amount = 7
|
||||
emitting = false
|
||||
amount = 48
|
||||
lifetime = 2.0
|
||||
one_shot = true
|
||||
explosiveness = 1.0
|
||||
randomness = 1.0
|
||||
local_coords = false
|
||||
process_material = SubResource( 16 )
|
||||
process_material = SubResource( 27 )
|
||||
draw_pass_1 = SubResource( 18 )
|
||||
|
||||
[node name="ParticlesSmoke" type="Particles" parent="."]
|
||||
transform = Transform( -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0, 1, 0, 0, 0 )
|
||||
visible = false
|
||||
emitting = false
|
||||
amount = 1
|
||||
lifetime = 3.0
|
||||
one_shot = true
|
||||
explosiveness = 1.0
|
||||
local_coords = false
|
||||
process_material = SubResource( 23 )
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
extends RigidBody
|
||||
|
||||
var explosion_effect = preload("res://Assets/Effects/GrenadeExplosion.tscn")
|
||||
|
||||
func _process(delta):
|
||||
# TODO: synchronize position
|
||||
pass
|
||||
|
||||
func explode():
|
||||
var explosion = explosion_effect.instance()
|
||||
explosion.global_transform = global_transform
|
||||
get_tree().root.call_deferred("add_child", explosion)
|
||||
queue_free()
|
||||
|
|
Reference in a new issue