A Third-Person-Shooter Godot game.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

405 lines
11 KiB

[gd_scene load_steps=38 format=2]
[ext_resource path="res://player/bullet/bullet.gd" type="Script" id=1]
[ext_resource path="res://effects_shared/bullet/BlastMesh_Sphere.mesh" type="ArrayMesh" id=2]
[ext_resource path="res://player/bullet/bullet_explode.wav" type="AudioStream" id=3]
[ext_resource path="res://effects_shared/bullet/effect/BlastMaterial.tres" type="Material" id=4]
[ext_resource path="res://effects_shared/bullet/effect/light_rays_material.tres" type="Material" id=5]
[ext_resource path="res://effects_shared/bullet/effect/LightParticle.tres" type="Material" id=6]
[ext_resource path="res://effects_shared/bullet/effect/SmokeParticles.tres" type="Material" id=7]
[ext_resource path="res://effects_shared/bullet/effect/SmokeOverrideMaterial.tres" type="Material" id=8]
[ext_resource path="res://player/bullet/bullet_material.tres" type="Material" id=9]
[ext_resource path="res://effects_shared/bullet/effect/MainBodyParticle.tres" type="Material" id=10]
[ext_resource path="res://effects_shared/bullet/effect/InnerBlastLightParticle.tres" type="Material" id=11]
[ext_resource path="res://effects_shared/bullet/effect/BlastSparksParticles.tres" type="Material" id=12]
[ext_resource path="res://effects_shared/bullet/effect/TrailParticle.tres" type="Material" id=13]
[sub_resource type="SphereMesh" id=1]
radial_segments = 9
rings = 5
[sub_resource type="SphereShape" id=2]
radius = 0.170413
[sub_resource type="Animation" id=3]
resource_name = "explode"
length = 3.0
step = 0.05
tracks/0/type = "value"
tracks/0/path = NodePath("OmniLight:light_energy")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.25, 0.85 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ 1.5, 3.0, 0.0 ]
}
tracks/1/type = "method"
tracks/1/path = NodePath(".")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 1.5 ),
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [ ],
"method": "queue_free"
} ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("BulletBody/MainBody:emitting")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
tracks/3/type = "value"
tracks/3/path = NodePath("MeshInstance:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
tracks/4/type = "value"
tracks/4/path = NodePath("ExplosionAudio:playing")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/keys = {
"times": PoolRealArray( 0.1 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/5/type = "value"
tracks/5/path = NodePath("Blast/BlastParticle:emitting")
tracks/5/interp = 1
tracks/5/loop_wrap = false
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/6/type = "value"
tracks/6/path = NodePath("Blast/LightBlast:emitting")
tracks/6/interp = 1
tracks/6/loop_wrap = false
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/7/type = "value"
tracks/7/path = NodePath("Blast/BlastSparks:emitting")
tracks/7/interp = 1
tracks/7/loop_wrap = true
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/8/type = "value"
tracks/8/path = NodePath("Blast/Smoke:emitting")
tracks/8/interp = 1
tracks/8/loop_wrap = true
tracks/8/imported = false
tracks/8/enabled = true
tracks/8/keys = {
"times": PoolRealArray( 0.2 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/9/type = "value"
tracks/9/path = NodePath("Blast/LightParticle:emitting")
tracks/9/interp = 1
tracks/9/loop_wrap = true
tracks/9/imported = false
tracks/9/enabled = true
tracks/9/keys = {
"times": PoolRealArray( 0.05 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/10/type = "value"
tracks/10/path = NodePath("Blast/InnerBlastLight:emitting")
tracks/10/interp = 1
tracks/10/loop_wrap = true
tracks/10/imported = false
tracks/10/enabled = true
tracks/10/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/11/type = "value"
tracks/11/path = NodePath("BulletBody/Trail:emitting")
tracks/11/interp = 1
tracks/11/loop_wrap = true
tracks/11/imported = false
tracks/11/enabled = true
tracks/11/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
[sub_resource type="Gradient" id=4]
offsets = PoolRealArray( 0, 0.318519, 1 )
colors = PoolColorArray( 0.828125, 1, 1, 1, 0, 1, 1, 1, 0, 0.0829163, 0.964844, 0 )
[sub_resource type="GradientTexture" id=5]
gradient = SubResource( 4 )
width = 128
[sub_resource type="Curve" id=6]
_data = [ Vector2( 0, 0 ), 0.0, 3.2107, 0, 0, Vector2( 0.575949, 1 ), 1.59619e-07, 0.0, 0, 0 ]
[sub_resource type="CurveTexture" id=7]
width = 128
curve = SubResource( 6 )
[sub_resource type="ParticlesMaterial" id=8]
spread = 0.0
gravity = Vector3( 0, 0, 0 )
scale = 0.7
scale_curve = SubResource( 7 )
color_ramp = SubResource( 5 )
[sub_resource type="Gradient" id=9]
offsets = PoolRealArray( 0, 0.703704 )
colors = PoolColorArray( 1, 1, 1, 1, 1, 1, 1, 0 )
[sub_resource type="GradientTexture" id=10]
gradient = SubResource( 9 )
width = 128
[sub_resource type="Curve" id=11]
_data = [ Vector2( 0, 0.236364 ), 0.0, 0.0, 0, 0, Vector2( 0.259494, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 0.763636 ), 0.0, 0.0, 0, 0 ]
[sub_resource type="CurveTexture" id=12]
width = 128
curve = SubResource( 11 )
[sub_resource type="ParticlesMaterial" id=13]
gravity = Vector3( 0, 0, 0 )
scale = 0.8
scale_curve = SubResource( 12 )
color_ramp = SubResource( 10 )
[sub_resource type="QuadMesh" id=14]
size = Vector2( 2, 2 )
[sub_resource type="Shader" id=15]
code = "shader_type spatial;
render_mode blend_mix,depth_draw_alpha_prepass,cull_back,diffuse_burley,specular_schlick_ggx;
uniform vec4 albedo : hint_color;
uniform sampler2D texture_albedo : hint_albedo;
uniform float point_size : hint_range(0,128);
uniform float emission_energy = 2.0;
void fragment() {
vec2 base_uv = UV;
vec4 albedo_tex = texture(texture_albedo,base_uv);
albedo_tex *= COLOR;
ALBEDO = albedo.rgb * albedo_tex.rgb;
EMISSION = ALBEDO * emission_energy;
}
"
[sub_resource type="ShaderMaterial" id=16]
shader = SubResource( 15 )
shader_param/albedo = Color( 1, 1, 1, 1 )
shader_param/point_size = 1.0
shader_param/emission_energy = 7.34
[sub_resource type="SphereMesh" id=22]
radius = 0.03
height = 0.06
[sub_resource type="QuadMesh" id=31]
size = Vector2( 2, 2 )
[sub_resource type="SpatialMaterial" id=32]
albedo_color = Color( 0.00784314, 0.988235, 0.988235, 1 )
emission_enabled = true
emission = Color( 0, 0.486275, 1, 1 )
emission_energy = 4.0
emission_operator = 0
emission_on_uv2 = false
[sub_resource type="SphereMesh" id=38]
radius = 0.05
height = 0.1
radial_segments = 4
rings = 4
[sub_resource type="SphereMesh" id=42]
radius = 0.3
height = 0.6
[sub_resource type="SpatialMaterial" id=48]
flags_transparent = true
vertex_color_use_as_albedo = true
vertex_color_is_srgb = true
roughness = 0.0
emission_enabled = true
emission = Color( 0, 0.929412, 1, 1 )
emission_energy = 2.0
emission_operator = 0
emission_on_uv2 = false
[sub_resource type="SphereMesh" id=49]
material = SubResource( 48 )
radius = 0.1
height = 0.2
radial_segments = 5
rings = 3
[sub_resource type="SphereMesh" id=55]
radius = 0.05
height = 0.3
radial_segments = 4
rings = 4
[node name="Bullet" type="KinematicBody"]
collision_layer = 0
collision_mask = 97
script = ExtResource( 1 )
[node name="MeshInstance" type="MeshInstance" parent="."]
transform = Transform( 0.1, 0, 0, 0, 0.1, 0, 0, 0, 0.1, 0, 0, 0 )
visible = false
cast_shadow = 0
mesh = SubResource( 1 )
material/0 = null
[node name="OmniLight" type="OmniLight" parent="."]
light_color = Color( 0, 1, 0.952941, 1 )
light_energy = 0.778846
light_bake_mode = 0
shadow_enabled = true
omni_range = 3.0
omni_attenuation = 2.0
omni_shadow_mode = 0
[node name="CollisionShape" type="CollisionShape" parent="."]
shape = SubResource( 2 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/explode = SubResource( 3 )
[node name="ExplosionAudio" type="AudioStreamPlayer3D" parent="."]
stream = ExtResource( 3 )
unit_size = 20.0
[node name="Blast" type="Spatial" parent="."]
[node name="BlastParticle" type="Particles" parent="Blast"]
material_override = ExtResource( 4 )
emitting = false
amount = 1
lifetime = 0.6
one_shot = true
process_material = SubResource( 8 )
draw_pass_1 = ExtResource( 2 )
[node name="LightBlast" type="Particles" parent="Blast"]
material_override = ExtResource( 5 )
emitting = false
amount = 1
lifetime = 0.15
one_shot = true
process_material = SubResource( 13 )
draw_pass_1 = SubResource( 14 )
[node name="BlastSparks" type="Particles" parent="Blast"]
material_override = SubResource( 16 )
emitting = false
amount = 10
lifetime = 0.3
one_shot = true
explosiveness = 0.92
process_material = ExtResource( 12 )
draw_pass_1 = SubResource( 22 )
[node name="Smoke" type="Particles" parent="Blast"]
material_override = ExtResource( 8 )
emitting = false
amount = 5
lifetime = 1.5
one_shot = true
explosiveness = 1.0
process_material = ExtResource( 7 )
draw_pass_1 = SubResource( 31 )
[node name="LightParticle" type="Particles" parent="Blast"]
material_override = SubResource( 32 )
emitting = false
amount = 3
lifetime = 0.8
one_shot = true
explosiveness = 0.84
process_material = ExtResource( 6 )
draw_pass_1 = SubResource( 38 )
[node name="InnerBlastLight" type="Particles" parent="Blast"]
material_override = ExtResource( 9 )
emitting = false
amount = 1
lifetime = 0.2
one_shot = true
process_material = ExtResource( 11 )
draw_pass_1 = SubResource( 42 )
[node name="MeshInstance2" type="MeshInstance" parent="."]
visible = false
material_override = ExtResource( 4 )
mesh = ExtResource( 2 )
material/0 = null
[node name="BulletBody" type="Spatial" parent="."]
[node name="MainBody" type="Particles" parent="BulletBody"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00988865, 0, 0 )
amount = 100
lifetime = 0.1
local_coords = false
process_material = ExtResource( 10 )
draw_pass_1 = SubResource( 49 )
[node name="Trail" type="Particles" parent="BulletBody"]
material_override = ExtResource( 9 )
amount = 10
local_coords = false
process_material = ExtResource( 13 )
draw_pass_1 = SubResource( 55 )