reticle moves when firing, stunned enemies have stars now
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
[gd_resource type="Theme" load_steps=2 format=3 uid="uid://clek42ofxr45f"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://xwew7f8vgxe5" path="res://assets/fonts/Rubik/static/Rubik-Light.ttf" id="1_hgcho"]
|
||||
[ext_resource type="FontFile" uid="uid://d2h2tjhxiv5wo" path="res://assets/fonts/White On Black.ttf" id="1_6yfpx"]
|
||||
|
||||
[resource]
|
||||
default_font = ExtResource("1_hgcho")
|
||||
default_font_size = 100
|
||||
default_font = ExtResource("1_6yfpx")
|
||||
default_font_size = 125
|
||||
|
||||
BIN
assets/Models/star1.blend
Normal file
BIN
assets/Models/star1.blend
Normal file
Binary file not shown.
51
assets/Models/star1.blend.import
Normal file
51
assets/Models/star1.blend.import
Normal file
@@ -0,0 +1,51 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://bkxgvvt7mdjhe"
|
||||
path="res://.godot/imported/star1.blend-12ce158c88218826803829de5e42deed.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Models/star1.blend"
|
||||
dest_files=["res://.godot/imported/star1.blend-12ce158c88218826803829de5e42deed.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
_subresources={}
|
||||
blender/nodes/visible=0
|
||||
blender/nodes/active_collection_only=false
|
||||
blender/nodes/punctual_lights=true
|
||||
blender/nodes/cameras=true
|
||||
blender/nodes/custom_properties=true
|
||||
blender/nodes/modifiers=1
|
||||
blender/meshes/colors=false
|
||||
blender/meshes/uvs=true
|
||||
blender/meshes/normals=true
|
||||
blender/meshes/tangents=true
|
||||
blender/meshes/skins=2
|
||||
blender/meshes/export_bones_deforming_mesh_only=false
|
||||
blender/materials/unpack_enabled=true
|
||||
blender/materials/export_materials=1
|
||||
blender/animation/limit_playback=true
|
||||
blender/animation/always_sample=true
|
||||
blender/animation/group_tracks=true
|
||||
BIN
assets/Models/star1.blend1
Normal file
BIN
assets/Models/star1.blend1
Normal file
Binary file not shown.
@@ -21,7 +21,7 @@ compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
@@ -32,6 +32,6 @@ process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
svg/scale=1.0
|
||||
svg/scale=5.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
|
||||
16
assets/UI/Crosshair/SVG/Stamina_White.svg
Normal file
16
assets/UI/Crosshair/SVG/Stamina_White.svg
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="Layer_2" data-name="Layer 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 92.53 92.53">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1 {
|
||||
fill: none;
|
||||
stroke: #fff;
|
||||
stroke-miterlimit: 10;
|
||||
stroke-width: 20px;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<g id="Layer_1-2" data-name="Layer 1">
|
||||
<circle class="cls-1" cx="46.27" cy="46.27" r="36.27"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 421 B |
37
assets/UI/Crosshair/SVG/Stamina_White.svg.import
Normal file
37
assets/UI/Crosshair/SVG/Stamina_White.svg.import
Normal file
@@ -0,0 +1,37 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://h2tp42xntorm"
|
||||
path="res://.godot/imported/Stamina_White.svg-49f454709daedfc3ce4b38c781d7f4a3.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/UI/Crosshair/SVG/Stamina_White.svg"
|
||||
dest_files=["res://.godot/imported/Stamina_White.svg-49f454709daedfc3ce4b38c781d7f4a3.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
|
||||
svg/scale=4.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
16
assets/UI/Crosshair/SVG/reticle_inner.svg
Normal file
16
assets/UI/Crosshair/SVG/reticle_inner.svg
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="Layer_2" data-name="Layer 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6.97 6.97">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1 {
|
||||
fill: #fff;
|
||||
stroke: #000;
|
||||
stroke-miterlimit: 10;
|
||||
stroke-width: .25px;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<g id="Layer_2-2" data-name="Layer 2">
|
||||
<circle class="cls-1" cx="3.49" cy="3.49" r="3.36"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 417 B |
37
assets/UI/Crosshair/SVG/reticle_inner.svg.import
Normal file
37
assets/UI/Crosshair/SVG/reticle_inner.svg.import
Normal file
@@ -0,0 +1,37 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cpe2ehq1vtj25"
|
||||
path="res://.godot/imported/reticle_inner.svg-55627ddc5200d199a492ce582229ca65.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/UI/Crosshair/SVG/reticle_inner.svg"
|
||||
dest_files=["res://.godot/imported/reticle_inner.svg-55627ddc5200d199a492ce582229ca65.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
|
||||
svg/scale=5.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
16
assets/UI/Crosshair/SVG/reticle_outer.svg
Normal file
16
assets/UI/Crosshair/SVG/reticle_outer.svg
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="Layer_2" data-name="Layer 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 39.59 39.59">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1 {
|
||||
fill: #fff;
|
||||
stroke: #000;
|
||||
stroke-miterlimit: 10;
|
||||
stroke-width: .25px;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<g id="Layer_2-2" data-name="Layer 2">
|
||||
<path class="cls-1" d="M19.8,39.46C8.95,39.46.12,30.63.12,19.8S8.95.12,19.8.12s19.67,8.82,19.67,19.67-8.82,19.67-19.67,19.67ZM19.8,3.13c-9.19,0-16.67,7.47-16.67,16.66s7.48,16.67,16.67,16.67,16.67-7.48,16.67-16.67S28.98,3.12,19.8,3.12h0Z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 606 B |
37
assets/UI/Crosshair/SVG/reticle_outer.svg.import
Normal file
37
assets/UI/Crosshair/SVG/reticle_outer.svg.import
Normal file
@@ -0,0 +1,37 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dumgg4fq1ngbj"
|
||||
path="res://.godot/imported/reticle_outer.svg-21ae5ac2f3e1c6066c57e075f6e328b0.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/UI/Crosshair/SVG/reticle_outer.svg"
|
||||
dest_files=["res://.godot/imported/reticle_outer.svg-21ae5ac2f3e1c6066c57e075f6e328b0.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
|
||||
svg/scale=5.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
@@ -61,13 +61,13 @@ points = PackedVector3Array(1.02121, 0.335057, -0.0550804, 1.0208, 0.331569, -0.
|
||||
_data = [Vector2(0, 0), 0.0, 1.4, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_csbqc"]
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_ojymx"]
|
||||
curve = SubResource("Curve_m4k82")
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_nisqe"]
|
||||
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0)
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_rly2i"]
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_4n4bc"]
|
||||
gradient = SubResource("Gradient_nisqe")
|
||||
|
||||
[sub_resource type="Curve" id="Curve_ddeei"]
|
||||
@@ -75,7 +75,7 @@ min_value = -1.0
|
||||
_data = [Vector2(0, -1), 0.0, 2.8, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_6yvtl"]
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_es573"]
|
||||
curve = SubResource("Curve_ddeei")
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_awcur"]
|
||||
@@ -89,14 +89,14 @@ initial_velocity_min = 10.0
|
||||
initial_velocity_max = 30.0
|
||||
gravity = Vector3(0, 0.5, 0)
|
||||
scale_min = 0.1
|
||||
color_ramp = SubResource("GradientTexture1D_rly2i")
|
||||
alpha_curve = SubResource("CurveTexture_csbqc")
|
||||
hue_variation_curve = SubResource("CurveTexture_6yvtl")
|
||||
color_ramp = SubResource("GradientTexture1D_4n4bc")
|
||||
alpha_curve = SubResource("CurveTexture_ojymx")
|
||||
hue_variation_curve = SubResource("CurveTexture_es573")
|
||||
turbulence_enabled = true
|
||||
turbulence_noise_strength = 0.0
|
||||
turbulence_noise_scale = 0.5
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_dk2fi"]
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_vi7dl"]
|
||||
transparency = 1
|
||||
blend_mode = 1
|
||||
shading_mode = 0
|
||||
@@ -105,7 +105,7 @@ albedo_texture = ExtResource("1_wii2f")
|
||||
billboard_mode = 1
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_a0k8c"]
|
||||
material = SubResource("StandardMaterial3D_dk2fi")
|
||||
material = SubResource("StandardMaterial3D_vi7dl")
|
||||
size = Vector2(10, 10)
|
||||
orientation = 2
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
[gd_scene load_steps=16 format=4 uid="uid://dlhjacsike5a4"]
|
||||
[gd_scene load_steps=26 format=4 uid="uid://dlhjacsike5a4"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://ch7jxw5ghkgij" path="res://assets/Models/oildrum1.albedo.png" id="1_uppfj"]
|
||||
[ext_resource type="Script" path="res://scripts/oildrum.gd" id="1_yvhou"]
|
||||
[ext_resource type="Texture2D" uid="uid://coy85a3x5unp8" path="res://assets/Models/oildrum1.metallic.png" id="2_ip3os"]
|
||||
[ext_resource type="PackedScene" uid="uid://b2e6q2gs3alc3" path="res://assets/barrel_explosion.tscn" id="2_ww2l7"]
|
||||
[ext_resource type="PackedScene" uid="uid://b2e6q2gs3alc3" path="res://assets/oil_drum_explosion.tscn" id="2_ww2l7"]
|
||||
[ext_resource type="Texture2D" uid="uid://ioiy6cm2ypl7" path="res://assets/Models/oildrum1.normal.png" id="3_ouyr7"]
|
||||
[ext_resource type="Texture2D" uid="uid://dhm0fgqc3nx2t" path="res://assets/Models/oildrum1.rough.png" id="4_t4407"]
|
||||
[ext_resource type="AudioStream" uid="uid://8w8imybwyxxa" path="res://assets/Audio/Various SFX/gas-leak-SBA-300149983.mp3" id="6_iai82"]
|
||||
[ext_resource type="AudioStream" uid="uid://dmt6bxnm00wfg" path="res://assets/Audio/Dropped Object/metal-heavy-drop-fall-SBA-300117028.wav" id="8_u73t3"]
|
||||
[ext_resource type="Texture2D" uid="uid://dn3b6uw8xr63m" path="res://assets/Textures/Smoke/smoketest_v1_0043.png" id="9_oqr3q"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ah05b"]
|
||||
resource_name = "oildrum1"
|
||||
@@ -72,6 +73,57 @@ radius = 10.0
|
||||
height = 1.26931
|
||||
radius = 0.425725
|
||||
|
||||
[sub_resource type="Curve" id="Curve_nyfhs"]
|
||||
_data = [Vector2(0, 0), 0.0, 1.4, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_csbqc"]
|
||||
curve = SubResource("Curve_nyfhs")
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_2etkt"]
|
||||
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0)
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_rly2i"]
|
||||
gradient = SubResource("Gradient_2etkt")
|
||||
|
||||
[sub_resource type="Curve" id="Curve_4gp8s"]
|
||||
min_value = -1.0
|
||||
_data = [Vector2(0, -1), 0.0, 2.8, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_6yvtl"]
|
||||
curve = SubResource("Curve_4gp8s")
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_nu0ea"]
|
||||
particle_flag_rotate_y = true
|
||||
emission_shape = 1
|
||||
emission_sphere_radius = 1.0
|
||||
velocity_pivot = Vector3(0, 1, 0)
|
||||
direction = Vector3(0, 1, 0)
|
||||
initial_velocity_min = 1.0
|
||||
initial_velocity_max = 1.0
|
||||
gravity = Vector3(0, 1, 0)
|
||||
scale_min = 0.1
|
||||
color_ramp = SubResource("GradientTexture1D_rly2i")
|
||||
alpha_curve = SubResource("CurveTexture_csbqc")
|
||||
hue_variation_curve = SubResource("CurveTexture_6yvtl")
|
||||
turbulence_noise_strength = 0.0
|
||||
turbulence_noise_scale = 1.0
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2e7oy"]
|
||||
transparency = 1
|
||||
blend_mode = 1
|
||||
shading_mode = 0
|
||||
albedo_color = Color(0.93, 0.5735, 0, 1)
|
||||
albedo_texture = ExtResource("9_oqr3q")
|
||||
billboard_mode = 1
|
||||
billboard_keep_scale = true
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_hi6ep"]
|
||||
material = SubResource("StandardMaterial3D_2e7oy")
|
||||
size = Vector2(3, 3)
|
||||
orientation = 2
|
||||
|
||||
[node name="Oildrum1" type="RigidBody3D" groups=["leak"]]
|
||||
collision_layer = 32
|
||||
collision_mask = 253
|
||||
@@ -106,4 +158,13 @@ shape = SubResource("SphereShape3D_p1wn3")
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0143872, 0)
|
||||
shape = SubResource("CylinderShape3D_uiqtq")
|
||||
|
||||
[node name="Flames" type="GPUParticles3D" parent="."]
|
||||
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0, 0, 0)
|
||||
emitting = false
|
||||
amount = 50
|
||||
lifetime = 4.0
|
||||
fixed_fps = 60
|
||||
process_material = SubResource("ParticleProcessMaterial_nu0ea")
|
||||
draw_pass_1 = SubResource("PlaneMesh_hi6ep")
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
|
||||
@@ -1098,7 +1098,7 @@ gun_name = ".44 Galore"
|
||||
gun_icon = ExtResource("3_nl201")
|
||||
fire_mode = 1
|
||||
fov_zoom_amt = 25
|
||||
recoil_amount = Vector3(0.25, 0.1, 0.1)
|
||||
recoil_amount = Vector3(0.125, 0.1, 0.1)
|
||||
max_ammo = 6
|
||||
bullet_damage = 5
|
||||
kick_amount = 2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=75 format=4 uid="uid://djr7vnr1hcx82"]
|
||||
[gd_scene load_steps=76 format=4 uid="uid://djr7vnr1hcx82"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/spider.gd" id="1_7e7fe"]
|
||||
[ext_resource type="Texture2D" uid="uid://dmyn4eq2r12ue" path="res://assets/Models/spider1.albedoRAW.png" id="1_di6b8"]
|
||||
@@ -18,6 +18,7 @@
|
||||
[ext_resource type="AudioStream" uid="uid://0n251thxlnnp" path="res://assets/Audio/cannon-fire-single-shot-blast-explosion-SBA-300098885.wav" id="10_2qmhc"]
|
||||
[ext_resource type="Material" uid="uid://cc0el8wu0au85" path="res://assets/materials/OutlineMat.tres" id="13_ee4im"]
|
||||
[ext_resource type="Texture2D" uid="uid://dn3b6uw8xr63m" path="res://assets/Textures/Smoke/smoketest_v1_0043.png" id="14_alcfd"]
|
||||
[ext_resource type="PackedScene" uid="uid://2mct75k6xcia" path="res://assets/stunned_stars.tscn" id="18_ippdt"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_rgii8"]
|
||||
resource_name = "spider1.turret"
|
||||
@@ -1006,6 +1007,9 @@ shape = SubResource("SphereShape3D_n7n6o")
|
||||
visible = false
|
||||
mesh = SubResource("ArrayMesh_v85cv")
|
||||
|
||||
[node name="StunnedStars" parent="body" instance=ExtResource("18_ippdt")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.803357, 0)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0258179, 1.03281, 0.00894165)
|
||||
shape = SubResource("BoxShape3D_xxx55")
|
||||
|
||||
197
assets/stunned_stars.tscn
Normal file
197
assets/stunned_stars.tscn
Normal file
File diff suppressed because one or more lines are too long
83
hud.tscn
83
hud.tscn
@@ -2,9 +2,9 @@
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/hud.gd" id="1_7hukm"]
|
||||
[ext_resource type="Theme" uid="uid://clek42ofxr45f" path="res://DefaultTheme.tres" id="1_22trs"]
|
||||
[ext_resource type="Theme" uid="uid://buma708jpxqrn" path="res://Clean_theme.tres" id="2_eqnx7"]
|
||||
[ext_resource type="Texture2D" uid="uid://b8r7mp1r4xqv1" path="res://assets/UI/Edit Files/0.5x/Stamina_White@0.5x.png" id="3_2injg"]
|
||||
[ext_resource type="Texture2D" uid="uid://mcay8s80071h" path="res://assets/UI/Crosshair/SVG/Reticle 1_svg.svg" id="3_tmj0x"]
|
||||
[ext_resource type="Texture2D" uid="uid://dumgg4fq1ngbj" path="res://assets/UI/Crosshair/SVG/reticle_outer.svg" id="3_mgrwc"]
|
||||
[ext_resource type="Texture2D" uid="uid://cpe2ehq1vtj25" path="res://assets/UI/Crosshair/SVG/reticle_inner.svg" id="4_61fkt"]
|
||||
[ext_resource type="Texture2D" uid="uid://h2tp42xntorm" path="res://assets/UI/Crosshair/SVG/Stamina_White.svg" id="4_ooaul"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_2hn4h"]
|
||||
bg_color = Color(1, 1, 1, 0.129412)
|
||||
@@ -42,10 +42,9 @@ offset_top = -247.09
|
||||
offset_right = 244.975
|
||||
offset_bottom = -142.09
|
||||
grow_vertical = 0
|
||||
theme = ExtResource("2_eqnx7")
|
||||
theme_type_variation = &"TextShadow"
|
||||
theme = ExtResource("1_22trs")
|
||||
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
|
||||
theme_override_font_sizes/font_size = 80
|
||||
theme_override_font_sizes/font_size = 125
|
||||
text = "$"
|
||||
|
||||
[node name="HealthBar" type="ProgressBar" parent="."]
|
||||
@@ -104,37 +103,31 @@ value = 35.29
|
||||
show_percentage = false
|
||||
|
||||
[node name="Crosshair" type="TextureRect" parent="." groups=["hud"]]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -20.0
|
||||
offset_top = -20.0
|
||||
offset_right = 20.0
|
||||
offset_bottom = 20.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("3_tmj0x")
|
||||
layout_mode = 0
|
||||
offset_right = 396.0
|
||||
offset_bottom = 396.0
|
||||
texture = ExtResource("3_mgrwc")
|
||||
expand_mode = 3
|
||||
stretch_mode = 4
|
||||
|
||||
[node name="CrosshairCenter" type="TextureRect" parent="." groups=["hud"]]
|
||||
layout_mode = 0
|
||||
offset_right = 396.0
|
||||
offset_bottom = 396.0
|
||||
scale = Vector2(0.02, 0.02)
|
||||
texture = ExtResource("4_61fkt")
|
||||
expand_mode = 3
|
||||
stretch_mode = 4
|
||||
|
||||
[node name="StaminaBar" type="TextureProgressBar" parent="."]
|
||||
material = SubResource("CanvasItemMaterial_ytfhs")
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -23.5
|
||||
offset_top = -23.5
|
||||
offset_right = 23.5
|
||||
offset_bottom = 23.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
layout_mode = 0
|
||||
offset_right = 370.0
|
||||
offset_bottom = 370.0
|
||||
scale = Vector2(0.3, 0.3)
|
||||
value = 49.0
|
||||
fill_mode = 5
|
||||
texture_progress = ExtResource("3_2injg")
|
||||
texture_progress = ExtResource("4_ooaul")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
layout_mode = 1
|
||||
@@ -162,15 +155,33 @@ theme_override_constants/separation = 10
|
||||
|
||||
[node name="Gun Name" type="Label" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("2_eqnx7")
|
||||
theme = ExtResource("1_22trs")
|
||||
theme_type_variation = &"TextShadow"
|
||||
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
|
||||
text = "Gun Name"
|
||||
horizontal_alignment = 2
|
||||
|
||||
[node name="Ammo" type="Label" parent="MarginContainer/VBoxContainer"]
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("2_eqnx7")
|
||||
size_flags_vertical = 3
|
||||
theme = ExtResource("1_22trs")
|
||||
theme_override_constants/separation = 50
|
||||
alignment = 1
|
||||
|
||||
[node name="AmmoCurrent" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_22trs")
|
||||
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
|
||||
text = "XX - XX"
|
||||
text = "XXX"
|
||||
horizontal_alignment = 2
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "-"
|
||||
|
||||
[node name="AmmoReserve" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_22trs")
|
||||
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
|
||||
text = "YYY"
|
||||
horizontal_alignment = 2
|
||||
|
||||
@@ -53,6 +53,7 @@ shader_parameter/vignette_intensity = 0.4
|
||||
shader_parameter/vignette_opacity = 0.235
|
||||
|
||||
[node name="PauseMenu" type="Control"]
|
||||
process_mode = 3
|
||||
material = SubResource("ShaderMaterial_62ipe")
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
|
||||
@@ -120,9 +120,7 @@ func refresh_scene():
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(_delta):
|
||||
#quit game and eventually go to menu
|
||||
if Input.is_action_just_pressed("escape"):
|
||||
pause_menu()
|
||||
pass
|
||||
|
||||
|
||||
|
||||
@@ -199,20 +197,19 @@ func pickup_spawn():
|
||||
item_spawn.rand_amt = randi_range(25,100)
|
||||
return item_spawn
|
||||
|
||||
func pause_menu():
|
||||
if paused:
|
||||
Engine.time_scale = engine_time_scale_cache
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||
player.toggle_hud(true)
|
||||
player.pause_menu.hide()
|
||||
else:
|
||||
engine_time_scale_cache = Engine.time_scale
|
||||
Engine.time_scale = 0
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
player.toggle_hud(false)
|
||||
player.pause_menu.show()
|
||||
|
||||
paused = !paused
|
||||
#func pause_menu():
|
||||
#if paused:
|
||||
#get_tree().paused = false
|
||||
#Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||
#player.toggle_hud(true)
|
||||
#player.pause_menu.hide()
|
||||
#else:
|
||||
#get_tree().paused = true
|
||||
#Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
#player.toggle_hud(false)
|
||||
#player.pause_menu.show()
|
||||
#
|
||||
#paused = !paused
|
||||
|
||||
func save_quit():
|
||||
SaveLoad.save_game_data(level_name)
|
||||
|
||||
@@ -106,7 +106,7 @@ func fire():
|
||||
player.recoil.add_recoil(Vector3(0,recoil_amount.y,recoil_amount.z),10,10)
|
||||
player.recoil.add_gun_recoil(recoil_amount.x)
|
||||
player.velocity += player.bullet_ray.global_basis * Vector3(0,0, kick_amount)
|
||||
SaveLoad.shots_fired = SaveLoad.null_data_check(SaveLoad.shots_fired, 1)
|
||||
SignalBus.emit_signal("shot_fired")
|
||||
|
||||
func reload():
|
||||
if level_control.ammo_current[gun_index] < max_ammo and player.gun.anim_player.get_current_animation() != "reload" and level_control.ammo_reserve[gun_index] > 0:
|
||||
|
||||
@@ -99,7 +99,7 @@ func shoot(delta):
|
||||
player.recoil.add_recoil(Vector3(0,recoil_amount.y,recoil_amount.z),10,10)
|
||||
player.recoil.add_gun_recoil(recoil_amount.x)
|
||||
#player.velocity += player.bullet_ray.global_basis * Vector3(0,0, kick_amount)
|
||||
SaveLoad.shots_fired = SaveLoad.null_data_check(SaveLoad.shots_fired, 1)
|
||||
SignalBus.emit_signal("shot_fired")
|
||||
if fire_mode != 0:
|
||||
cycle_count -= 1
|
||||
|
||||
|
||||
@@ -2,21 +2,29 @@ extends Control
|
||||
|
||||
@export var radial_stamina : bool = false
|
||||
|
||||
## VIEWPORT
|
||||
var viewportWidth
|
||||
var viewportHeight
|
||||
|
||||
var current_stam_bar
|
||||
var stam_bar_visible : bool = false
|
||||
var interact_visible : bool = false
|
||||
var health_bar_start_pos
|
||||
var money_count : int = 0
|
||||
|
||||
var crosshair_target
|
||||
|
||||
@onready var level_control = get_tree().current_scene
|
||||
@onready var player = level_control.player
|
||||
@onready var stamina_bar: TextureProgressBar = $StaminaBar
|
||||
@onready var stamina_bar_2: ProgressBar = $StaminaBar2
|
||||
@onready var health_bar: ProgressBar = $HealthBar
|
||||
@onready var gun_name: Label = $"MarginContainer/VBoxContainer/Gun Name"
|
||||
@onready var ammo: Label = $MarginContainer/VBoxContainer/Ammo
|
||||
@onready var ammo_current: Label = $MarginContainer/VBoxContainer/HBoxContainer/AmmoCurrent
|
||||
@onready var ammo_reserve: Label = $MarginContainer/VBoxContainer/HBoxContainer/AmmoReserve
|
||||
@onready var money: Label = $Money
|
||||
@onready var crosshair: TextureRect = $Crosshair
|
||||
@onready var crosshair_center: TextureRect = $CrosshairCenter
|
||||
|
||||
const FULL_WHITE = Color(1, 1, 1, 1)
|
||||
const TRANSPARENT = Color(1, 1, 1, 0)
|
||||
@@ -25,14 +33,24 @@ const ORANGE_COLOR = Color(0.822, 0.318, 0.086)
|
||||
const GREEN_COLOR = Color(0, 0.608, 0.172)
|
||||
|
||||
const STAM_BAR_MAX_OPACITY = 1.0
|
||||
const CROSSHAIR_SIZE = Vector2(40,40)
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
# Get Viewport size
|
||||
viewportWidth = get_viewport().size.x
|
||||
viewportHeight = get_viewport().size.y
|
||||
|
||||
|
||||
SignalBus.player_hit.connect(player_hit)
|
||||
SignalBus.shot_fired.connect(crosshair_size_change)
|
||||
|
||||
health_bar.max_value = level_control.start_health
|
||||
|
||||
health_bar_start_pos = health_bar.position
|
||||
|
||||
crosshair_target = CROSSHAIR_SIZE
|
||||
|
||||
if radial_stamina:
|
||||
current_stam_bar = stamina_bar
|
||||
stamina_bar_2.visible = false
|
||||
@@ -44,6 +62,14 @@ func _ready() -> void:
|
||||
func _process(delta: float) -> void:
|
||||
player = level_control.player
|
||||
if player != null:
|
||||
# Crosshair
|
||||
crosshair_target = lerp(crosshair_target,CROSSHAIR_SIZE,delta * 5)
|
||||
crosshair.size = lerp(crosshair.size, crosshair_target,delta * 20)
|
||||
crosshair.position = Vector2(viewportWidth/2,viewportHeight/2) + (crosshair.size/-2)
|
||||
crosshair_center.position = Vector2(viewportWidth/2,viewportHeight/2) + (crosshair_center.scale * crosshair_center.size/-2)
|
||||
stamina_bar.scale = (crosshair.size/CROSSHAIR_SIZE) * Vector2(.185,.185)
|
||||
stamina_bar.position = Vector2(viewportWidth/2,viewportHeight/2) + (stamina_bar.scale * stamina_bar.size/-2)
|
||||
|
||||
#HEALTH
|
||||
health_bar.value = level_control.health
|
||||
if level_control.health <= 2:
|
||||
@@ -72,10 +98,13 @@ func _process(delta: float) -> void:
|
||||
current_stam_bar.value = player.remaining_stamina
|
||||
|
||||
if player.gun != null:
|
||||
ammo.text = str(level_control.ammo_current[level_control.current_gun_index]) +" | " + str(level_control.ammo_reserve[level_control.current_gun_index])
|
||||
lerp_color(ammo,RED_COLOR,FULL_WHITE,level_control.ammo_current[level_control.current_gun_index],player.gun.max_ammo,.5)
|
||||
ammo_current.text = str(level_control.ammo_current[level_control.current_gun_index]).pad_zeros(2)
|
||||
ammo_reserve.text = str(level_control.ammo_reserve[level_control.current_gun_index]).pad_zeros(3)
|
||||
lerp_color(ammo_current,RED_COLOR,FULL_WHITE,level_control.ammo_current[level_control.current_gun_index],player.gun.max_ammo,.5)
|
||||
lerp_color(ammo_reserve,RED_COLOR,FULL_WHITE,level_control.ammo_reserve[level_control.current_gun_index],player.gun.max_ammo*2,.5)
|
||||
else:
|
||||
fade_in_out(ammo,1,false,10,delta)
|
||||
fade_in_out(ammo_current,1,false,10,delta)
|
||||
fade_in_out(ammo_reserve,1,false,10,delta)
|
||||
fade_in_out(crosshair,1,false,10,delta)
|
||||
|
||||
if player.gun != null:
|
||||
@@ -117,6 +146,11 @@ func _process(delta: float) -> void:
|
||||
## FADE ELEMENTS IN AND OUT
|
||||
fade_in_out(current_stam_bar,STAM_BAR_MAX_OPACITY,stam_bar_visible,5,delta)
|
||||
|
||||
func crosshair_size_change():
|
||||
crosshair_target += Vector2(40,40)
|
||||
|
||||
|
||||
|
||||
func shake_element(amount):
|
||||
var rand_x = randf_range(-amount,amount)
|
||||
var rand_y = randf_range(-amount,amount)
|
||||
|
||||
@@ -9,6 +9,7 @@ extends RigidBody3D
|
||||
@onready var blast_radius_area: Area3D = $BlastRadius
|
||||
@onready var radius_shape: CollisionShape3D = $BlastRadius/CollisionShape3D
|
||||
@onready var audio_drop: AudioStreamPlayer3D = $audio_drop
|
||||
@onready var flames: GPUParticles3D = $Flames
|
||||
|
||||
var leak_hp = false
|
||||
var blast_amount
|
||||
@@ -24,7 +25,7 @@ func _ready() -> void:
|
||||
func _process(delta: float) -> void:
|
||||
if leak_hp:
|
||||
hp -= delta * HP_LEAK_RATE
|
||||
print("HP - ",hp)
|
||||
flames.emitting = true
|
||||
if hp <= 0:
|
||||
explode()
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
extends Control
|
||||
|
||||
@onready var level_control = get_tree().current_scene
|
||||
@onready var player: CharacterBody3D = $"../../../.."
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
@@ -13,7 +14,7 @@ func _process(delta: float) -> void:
|
||||
|
||||
|
||||
func _on_resume_pressed() -> void:
|
||||
level_control.pause_menu()
|
||||
resume()
|
||||
|
||||
|
||||
func _on_save__quit_pressed() -> void:
|
||||
@@ -22,3 +23,20 @@ func _on_save__quit_pressed() -> void:
|
||||
|
||||
func _on_load_pressed() -> void:
|
||||
SaveLoad.load_data()
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if Input.is_action_just_pressed("escape"):
|
||||
pause()
|
||||
|
||||
func pause():
|
||||
get_tree().paused = true
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
player.toggle_hud(false)
|
||||
player.pause_menu.show()
|
||||
|
||||
|
||||
func resume():
|
||||
hide()
|
||||
get_tree().paused = false
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||
player.toggle_hud(true)
|
||||
|
||||
@@ -131,7 +131,7 @@ func shoot(delta):
|
||||
audio_fire.pitch_scale = 1 + rng.randf_range(-fire_pitch_scale_amt,fire_pitch_scale_amt)
|
||||
audio_fire.play()
|
||||
anim_player.play("shoot") #actual bullet spawn triggered by animation
|
||||
SaveLoad.shots_fired = SaveLoad.null_data_check(SaveLoad.shots_fired, 1)
|
||||
SignalBus.emit_signal("shot_fired")
|
||||
if fire_mode != 0:
|
||||
cycle_count -= 1
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ func shoot(delta):
|
||||
instance_bullet.player_position = player.global_position
|
||||
get_tree().get_root().add_child(instance_bullet)
|
||||
player.recoil.add_recoil(recoil_amount,10,10)
|
||||
SaveLoad.shots_fired = SaveLoad.null_data_check(SaveLoad.shots_fired, 1)
|
||||
SignalBus.emit_signal("shot_fired")
|
||||
if fire_mode != 0:
|
||||
cycle_count -= 1
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ var reserve_ammo
|
||||
var persistent_save_path = "user://persistent_data.save"
|
||||
|
||||
func _ready() -> void:
|
||||
SignalBus.shot_fired.connect(shot_fired)
|
||||
|
||||
if player_deaths == null:
|
||||
player_deaths = 0
|
||||
if enemies_killed == null:
|
||||
@@ -218,3 +220,6 @@ func load_resource_path(array):
|
||||
var i_loaded = load(i)
|
||||
final_array.append(i_loaded)
|
||||
return final_array
|
||||
|
||||
func shot_fired():
|
||||
null_data_check(shots_fired, 1)
|
||||
|
||||
@@ -2,10 +2,13 @@ extends Node
|
||||
|
||||
signal switch_changed()
|
||||
signal switch_timeout()
|
||||
signal enemy_count_changed()
|
||||
signal game_loaded()
|
||||
|
||||
##PLAYER
|
||||
signal player_hit()
|
||||
signal shot_fired()
|
||||
signal enemy_hit()
|
||||
signal enemy_killed()
|
||||
signal king_killed()
|
||||
signal enemy_count_changed()
|
||||
signal game_loaded()
|
||||
signal player_hit()
|
||||
signal weapon_list_changed()
|
||||
|
||||
@@ -48,6 +48,7 @@ const MAX_AV = 10
|
||||
@onready var turret_look = $TurretLook
|
||||
@onready var smoke: GPUParticles3D = $TurretLook/Turret/Smoke
|
||||
@onready var smoke_2: GPUParticles3D = $TurretLook/Turret/Smoke2
|
||||
@onready var stunned_stars: Node3D = $body/StunnedStars
|
||||
@onready var outline_meshes = [$TurretLook/Turret/turretoutline,
|
||||
$body/leg1/foot1/foot1outline,
|
||||
$body/leg1/leg1outline,
|
||||
@@ -92,6 +93,7 @@ func _process(delta):
|
||||
velocity = hive_velocity
|
||||
|
||||
if !stunned:
|
||||
stunned_stars.visible = false
|
||||
#Sightline
|
||||
if turret_look_next.is_colliding() and turret_look_next.get_collider().is_in_group("player"):
|
||||
player_in_view = true
|
||||
@@ -104,6 +106,7 @@ func _process(delta):
|
||||
else:
|
||||
body.rotation.y = lerp(body.rotation.y, body.rotation.y + 10, delta * .1)
|
||||
turret_look.rotation.y = lerp(turret_look.rotation.y,turret_look.rotation.y - 10,delta * .5)
|
||||
stunned_stars.visible = true
|
||||
|
||||
#apply gravity
|
||||
if !is_on_floor():
|
||||
|
||||
@@ -121,7 +121,7 @@ func fire():
|
||||
spawn_casing()
|
||||
player.recoil.add_recoil(Vector3(0,recoil_amount.y,recoil_amount.z),10,10)
|
||||
player.recoil.add_gun_recoil(recoil_amount.x)
|
||||
SaveLoad.shots_fired = SaveLoad.null_data_check(SaveLoad.shots_fired, 1)
|
||||
SignalBus.emit_signal("shot_fired")
|
||||
if fire_mode != 0:
|
||||
cycle_count -= 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user