more hud work
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=19 format=4 uid="uid://2qe0qva745ft"]
|
[gd_scene load_steps=20 format=4 uid="uid://2qe0qva745ft"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://scripts/LevelManager.gd" id="1_p4w8f"]
|
[ext_resource type="Script" path="res://scripts/LevelManager.gd" id="1_p4w8f"]
|
||||||
[ext_resource type="Material" uid="uid://br2pyyyl2n3cx" path="res://assets/materials/prototype/prototype1.tres" id="2_0dugn"]
|
[ext_resource type="Material" uid="uid://br2pyyyl2n3cx" path="res://assets/materials/prototype/prototype1.tres" id="2_0dugn"]
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
[ext_resource type="Script" path="res://scripts/room_manager.gd" id="7_gjclr"]
|
[ext_resource type="Script" path="res://scripts/room_manager.gd" id="7_gjclr"]
|
||||||
[ext_resource type="PackedScene" uid="uid://djr7vnr1hcx82" path="res://assets/spider2.tscn" id="8_dbtj1"]
|
[ext_resource type="PackedScene" uid="uid://djr7vnr1hcx82" path="res://assets/spider2.tscn" id="8_dbtj1"]
|
||||||
[ext_resource type="PackedScene" uid="uid://20csd6dmwj4y" path="res://assets/jump_platform.tscn" id="10_q51tk"]
|
[ext_resource type="PackedScene" uid="uid://20csd6dmwj4y" path="res://assets/jump_platform.tscn" id="10_q51tk"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dlhjacsike5a4" path="res://assets/oildrum1.tscn" id="11_quoke"]
|
||||||
[ext_resource type="PackedScene" uid="uid://clu76sc4uoswn" path="res://assets/rocketlauncher_pickup.tscn" id="11_ywujp"]
|
[ext_resource type="PackedScene" uid="uid://clu76sc4uoswn" path="res://assets/rocketlauncher_pickup.tscn" id="11_ywujp"]
|
||||||
|
|
||||||
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_0gb6c"]
|
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_0gb6c"]
|
||||||
@@ -218,3 +219,9 @@ jump_amount = 15
|
|||||||
|
|
||||||
[node name="rocketlauncher1_pickup" parent="." instance=ExtResource("11_ywujp")]
|
[node name="rocketlauncher1_pickup" parent="." instance=ExtResource("11_ywujp")]
|
||||||
transform = Transform3D(0.0918144, 0, -0.995776, 0, 1, 0, 0.995776, 0, 0.0918144, 105.97, -11.8855, -22.3294)
|
transform = Transform3D(0.0918144, 0, -0.995776, 0, 1, 0, 0.995776, 0, 0.0918144, 105.97, -11.8855, -22.3294)
|
||||||
|
|
||||||
|
[node name="Oildrum1" parent="." instance=ExtResource("11_quoke")]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30.5495, -11.7726, -17.1589)
|
||||||
|
|
||||||
|
[node name="Oildrum2" parent="." instance=ExtResource("11_quoke")]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30.4028, -11.7726, -25.0833)
|
||||||
|
|||||||
40
assets/Shaders/blur.gdshader
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
shader_type canvas_item;
|
||||||
|
|
||||||
|
#define pow2(x) (x * x)
|
||||||
|
#define iResolution 1.0/SCREEN_PIXEL_SIZE
|
||||||
|
|
||||||
|
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;
|
||||||
|
uniform float strength : hint_range(0.0, 5.0, 0.1) = 3.0;
|
||||||
|
const float pi = atan(1.0) * 4.0;
|
||||||
|
const int samples = 35;
|
||||||
|
const float sigma = float(samples) * 0.25;
|
||||||
|
|
||||||
|
float gaussian(vec2 i) {
|
||||||
|
return 1.0 / (2.0 * pi * pow2(sigma)) * exp(-((pow2(i.x) + pow2(i.y)) / (2.0 * pow2(sigma))));
|
||||||
|
}
|
||||||
|
|
||||||
|
vec3 blur(sampler2D sp, vec2 uv, vec2 scale) {
|
||||||
|
vec3 col = vec3(0.0);
|
||||||
|
float accum = 0.0;
|
||||||
|
float weight;
|
||||||
|
vec2 offset;
|
||||||
|
|
||||||
|
for (int x = -samples / 2; x < samples / 2; ++x) {
|
||||||
|
for (int y = -samples / 2; y < samples / 2; ++y) {
|
||||||
|
offset = vec2(float(x), float(y));
|
||||||
|
weight = gaussian(offset);
|
||||||
|
col += texture(sp, uv + scale * offset).rgb * weight;
|
||||||
|
accum += weight;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return col / accum;
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment() {
|
||||||
|
vec2 ps = vec2(1.0) / iResolution.xy * .000001 * strength;
|
||||||
|
vec2 uv = UV ;
|
||||||
|
|
||||||
|
COLOR.rgb = blur(SCREEN_TEXTURE, uv, ps );
|
||||||
|
COLOR.a = 1.0;
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 18 KiB |
@@ -21,7 +21,7 @@ compress/lossy_quality=0.7
|
|||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
mipmaps/generate=false
|
mipmaps/generate=true
|
||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
roughness/src_normal=""
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ compress/lossy_quality=0.7
|
|||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
mipmaps/generate=false
|
mipmaps/generate=true
|
||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
roughness/src_normal=""
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ compress/lossy_quality=0.7
|
|||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
mipmaps/generate=false
|
mipmaps/generate=true
|
||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
roughness/src_normal=""
|
||||||
|
|||||||
@@ -40,3 +40,4 @@ volume_db = 10.0
|
|||||||
doppler_tracking = 2
|
doppler_tracking = 2
|
||||||
|
|
||||||
[connection signal="body_entered" from="Area3D" to="." method="_on_area_3d_body_entered"]
|
[connection signal="body_entered" from="Area3D" to="." method="_on_area_3d_body_entered"]
|
||||||
|
[connection signal="body_exited" from="Area3D" to="." method="_on_area_3d_body_exited"]
|
||||||
|
|||||||
@@ -491,7 +491,7 @@ _data = {
|
|||||||
script = ExtResource("2_tskiy")
|
script = ExtResource("2_tskiy")
|
||||||
gun_name = "Mac 10"
|
gun_name = "Mac 10"
|
||||||
gun_icon = ExtResource("3_p1hxc")
|
gun_icon = ExtResource("3_p1hxc")
|
||||||
fov_zoom_amt = 0.998
|
fov_zoom_amt = 5.0
|
||||||
recoil_amount = Vector3(0.02, 0.05, 0.05)
|
recoil_amount = Vector3(0.02, 0.05, 0.05)
|
||||||
max_ammo = 20
|
max_ammo = 20
|
||||||
bullet_damage = 2
|
bullet_damage = 2
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ size = Vector2(3, 3)
|
|||||||
orientation = 2
|
orientation = 2
|
||||||
|
|
||||||
[node name="Oildrum1" type="RigidBody3D" groups=["leak"]]
|
[node name="Oildrum1" type="RigidBody3D" groups=["leak"]]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.725629, 0)
|
||||||
collision_layer = 32
|
collision_layer = 32
|
||||||
collision_mask = 253
|
collision_mask = 253
|
||||||
mass = 10.0
|
mass = 10.0
|
||||||
|
|||||||
@@ -143,10 +143,13 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.437954, -1)
|
|||||||
stream = ExtResource("14_pnsbm")
|
stream = ExtResource("14_pnsbm")
|
||||||
volume_db = 2.0
|
volume_db = 2.0
|
||||||
|
|
||||||
|
[node name="HUD" parent="Head/Recoil/Camera3D" instance=ExtResource("5_yenaw")]
|
||||||
|
|
||||||
[node name="WeaponSelect" parent="Head/Recoil/Camera3D" instance=ExtResource("5_bvbcl")]
|
[node name="WeaponSelect" parent="Head/Recoil/Camera3D" instance=ExtResource("5_bvbcl")]
|
||||||
visible = false
|
visible = false
|
||||||
|
light_mask = 2
|
||||||
[node name="HUD" parent="Head/Recoil/Camera3D" instance=ExtResource("5_yenaw")]
|
visibility_layer = 2
|
||||||
|
z_index = 1
|
||||||
|
|
||||||
[node name="GunRay" type="RayCast3D" parent="Head/Recoil/Camera3D" groups=["gun_ray"]]
|
[node name="GunRay" type="RayCast3D" parent="Head/Recoil/Camera3D" groups=["gun_ray"]]
|
||||||
transform = Transform3D(0.977933, 0, -0.208919, 0, 1, 7.45058e-09, 0.208919, 0, 0.977933, 0, -0.197421, -0.129669)
|
transform = Transform3D(0.977933, 0, -0.208919, 0, 1, 7.45058e-09, 0.208919, 0, 0.977933, 0, -0.197421, -0.129669)
|
||||||
|
|||||||
@@ -1097,7 +1097,7 @@ script = ExtResource("2_7rsti")
|
|||||||
gun_name = ".44 Galore"
|
gun_name = ".44 Galore"
|
||||||
gun_icon = ExtResource("3_nl201")
|
gun_icon = ExtResource("3_nl201")
|
||||||
fire_mode = 1
|
fire_mode = 1
|
||||||
fov_zoom_amt = 25
|
fov_zoom_amt = 15
|
||||||
recoil_amount = Vector3(0.125, 0.1, 0.1)
|
recoil_amount = Vector3(0.125, 0.1, 0.1)
|
||||||
max_ammo = 6
|
max_ammo = 6
|
||||||
bullet_damage = 5
|
bullet_damage = 5
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ radius = 10.0
|
|||||||
|
|
||||||
[node name="Rocket" type="RigidBody3D" node_paths=PackedStringArray("blast_radius_area", "radius_shape")]
|
[node name="Rocket" type="RigidBody3D" node_paths=PackedStringArray("blast_radius_area", "radius_shape")]
|
||||||
collision_layer = 0
|
collision_layer = 0
|
||||||
collision_mask = 105
|
collision_mask = 233
|
||||||
center_of_mass_mode = 1
|
center_of_mass_mode = 1
|
||||||
center_of_mass = Vector3(0, 0, -0.45)
|
center_of_mass = Vector3(0, 0, -0.45)
|
||||||
continuous_cd = true
|
continuous_cd = true
|
||||||
|
|||||||
@@ -1024,6 +1024,7 @@ avoidance_enabled = true
|
|||||||
wait_time = 0.3
|
wait_time = 0.3
|
||||||
|
|
||||||
[node name="postfire_timer" type="Timer" parent="Timers"]
|
[node name="postfire_timer" type="Timer" parent="Timers"]
|
||||||
|
wait_time = 3.0
|
||||||
one_shot = true
|
one_shot = true
|
||||||
autostart = true
|
autostart = true
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,11 @@ resource_name = "star"
|
|||||||
transparency = 1
|
transparency = 1
|
||||||
blend_mode = 1
|
blend_mode = 1
|
||||||
cull_mode = 2
|
cull_mode = 2
|
||||||
albedo_color = Color(0.91, 0.73801, 0.3367, 0.654902)
|
albedo_color = Color(0.91, 0.73801, 0.3367, 0.117647)
|
||||||
roughness = 0.5
|
roughness = 0.5
|
||||||
emission_enabled = true
|
emission_enabled = true
|
||||||
emission = Color(0.91, 0.74256, 0.0728, 1)
|
emission = Color(0.91, 0.77168, 0.2184, 1)
|
||||||
|
emission_energy_multiplier = 5.0
|
||||||
|
|
||||||
[sub_resource type="ArrayMesh" id="ArrayMesh_6tg4b"]
|
[sub_resource type="ArrayMesh" id="ArrayMesh_6tg4b"]
|
||||||
_surfaces = [{
|
_surfaces = [{
|
||||||
@@ -44,6 +45,45 @@ _surfaces = [{
|
|||||||
blend_shape_mode = 0
|
blend_shape_mode = 0
|
||||||
shadow_mesh = SubResource("ArrayMesh_6tg4b")
|
shadow_mesh = SubResource("ArrayMesh_6tg4b")
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_fj2ge"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("StarRotate:rotation")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector3(0, 5.65487, 0)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("StarRotate/Odds:position")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector3(0, 0.2, 0)]
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath("StarRotate/Evens:position")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector3(0, 0, 0)]
|
||||||
|
}
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_s5evp"]
|
[sub_resource type="Animation" id="Animation_s5evp"]
|
||||||
resource_name = "stunned"
|
resource_name = "stunned"
|
||||||
length = 2.0
|
length = 2.0
|
||||||
@@ -85,45 +125,6 @@ tracks/2/keys = {
|
|||||||
"values": [Vector3(0, 0, 0), Vector3(0, 0.2, 0), Vector3(0, 0, 0)]
|
"values": [Vector3(0, 0, 0), Vector3(0, 0.2, 0), Vector3(0, 0, 0)]
|
||||||
}
|
}
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_fj2ge"]
|
|
||||||
length = 0.001
|
|
||||||
tracks/0/type = "value"
|
|
||||||
tracks/0/imported = false
|
|
||||||
tracks/0/enabled = true
|
|
||||||
tracks/0/path = NodePath("StarRotate:rotation")
|
|
||||||
tracks/0/interp = 1
|
|
||||||
tracks/0/loop_wrap = true
|
|
||||||
tracks/0/keys = {
|
|
||||||
"times": PackedFloat32Array(0),
|
|
||||||
"transitions": PackedFloat32Array(1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Vector3(0, 5.65487, 0)]
|
|
||||||
}
|
|
||||||
tracks/1/type = "value"
|
|
||||||
tracks/1/imported = false
|
|
||||||
tracks/1/enabled = true
|
|
||||||
tracks/1/path = NodePath("StarRotate/Odds:position")
|
|
||||||
tracks/1/interp = 1
|
|
||||||
tracks/1/loop_wrap = true
|
|
||||||
tracks/1/keys = {
|
|
||||||
"times": PackedFloat32Array(0),
|
|
||||||
"transitions": PackedFloat32Array(1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Vector3(0, 0.2, 0)]
|
|
||||||
}
|
|
||||||
tracks/2/type = "value"
|
|
||||||
tracks/2/imported = false
|
|
||||||
tracks/2/enabled = true
|
|
||||||
tracks/2/path = NodePath("StarRotate/Evens:position")
|
|
||||||
tracks/2/interp = 1
|
|
||||||
tracks/2/loop_wrap = true
|
|
||||||
tracks/2/keys = {
|
|
||||||
"times": PackedFloat32Array(0),
|
|
||||||
"transitions": PackedFloat32Array(1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Vector3(0, 0, 0)]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_7fuec"]
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_7fuec"]
|
||||||
_data = {
|
_data = {
|
||||||
"RESET": SubResource("Animation_fj2ge"),
|
"RESET": SubResource("Animation_fj2ge"),
|
||||||
@@ -133,7 +134,7 @@ _data = {
|
|||||||
[node name="StunnedStars" type="Node3D"]
|
[node name="StunnedStars" type="Node3D"]
|
||||||
|
|
||||||
[node name="StarRotate" type="Node3D" parent="."]
|
[node name="StarRotate" type="Node3D" parent="."]
|
||||||
transform = Transform3D(0.809017, 0, -0.587785, 0, 1, 0, 0.587785, 0, 0.809017, 0, 0, 0)
|
transform = Transform3D(0.809019, 0, -0.587783, 0, 1, 0, 0.587783, 0, 0.809019, 0, 0, 0)
|
||||||
|
|
||||||
[node name="Odds" type="Node3D" parent="StarRotate"]
|
[node name="Odds" type="Node3D" parent="StarRotate"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.2, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.2, 0)
|
||||||
|
|||||||
@@ -15,8 +15,7 @@
|
|||||||
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_n016m"]
|
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_n016m"]
|
||||||
sky_top_color = Color(1, 1, 1, 1)
|
sky_top_color = Color(1, 1, 1, 1)
|
||||||
sky_horizon_color = Color(0.81452, 0.81452, 0.81452, 1)
|
sky_horizon_color = Color(0.81452, 0.81452, 0.81452, 1)
|
||||||
ground_bottom_color = Color(0.258082, 0.258082, 0.258082, 1)
|
ground_bottom_color = Color(0, 0, 0, 1)
|
||||||
ground_horizon_color = Color(0.81452, 0.81452, 0.81452, 1)
|
|
||||||
|
|
||||||
[sub_resource type="Sky" id="Sky_qjshd"]
|
[sub_resource type="Sky" id="Sky_qjshd"]
|
||||||
sky_material = SubResource("ProceduralSkyMaterial_n016m")
|
sky_material = SubResource("ProceduralSkyMaterial_n016m")
|
||||||
@@ -26,6 +25,7 @@ background_mode = 2
|
|||||||
sky = SubResource("Sky_qjshd")
|
sky = SubResource("Sky_qjshd")
|
||||||
tonemap_mode = 2
|
tonemap_mode = 2
|
||||||
ssao_enabled = true
|
ssao_enabled = true
|
||||||
|
ssil_enabled = true
|
||||||
sdfgi_enabled = true
|
sdfgi_enabled = true
|
||||||
glow_enabled = true
|
glow_enabled = true
|
||||||
|
|
||||||
@@ -54,8 +54,8 @@ size = 1.86
|
|||||||
|
|
||||||
[node name="snapshotModel" type="Node3D" parent="CAPTURE/SubViewport"]
|
[node name="snapshotModel" type="Node3D" parent="CAPTURE/SubViewport"]
|
||||||
|
|
||||||
[node name="RocketLauncher" parent="CAPTURE/SubViewport/snapshotModel" instance=ExtResource("2_i6mk3")]
|
[node name="Pistol" parent="CAPTURE/SubViewport/snapshotModel" instance=ExtResource("5_v3dls")]
|
||||||
transform = Transform3D(0.993044, 0, 0.117746, 0, 1, 0, -0.117746, 0, 0.993044, 0.404976, -0.229299, 0.321818)
|
transform = Transform3D(0.99685, -0.0265935, -0.0747243, 0.00602563, 0.964785, -0.262972, 0.0790863, 0.261693, 0.961906, -0.0143074, -0.0145504, 0.231109)
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||||
texture = SubResource("ViewportTexture_xiqw1")
|
texture = SubResource("ViewportTexture_xiqw1")
|
||||||
@@ -64,9 +64,6 @@ texture = SubResource("ViewportTexture_xiqw1")
|
|||||||
transform = Transform3D(-0.707107, 0, -0.707107, 0, 1, 0, 0.707107, 0, -0.707107, -0.697249, -2.38419e-07, -0.649448)
|
transform = Transform3D(-0.707107, 0, -0.707107, 0, 1, 0, 0.707107, 0, -0.707107, -0.697249, -2.38419e-07, -0.649448)
|
||||||
visible = false
|
visible = false
|
||||||
|
|
||||||
[node name="Pistol" parent="PHOTOGRAPHED" instance=ExtResource("5_v3dls")]
|
|
||||||
transform = Transform3D(-0.707107, 0, 0.707107, 0, 1, 0, -0.707107, 0, -0.707107, 0.139735, -0.0145502, -1.10556)
|
|
||||||
|
|
||||||
[node name="Crown" parent="PHOTOGRAPHED" instance=ExtResource("3_gog5n")]
|
[node name="Crown" parent="PHOTOGRAPHED" instance=ExtResource("3_gog5n")]
|
||||||
transform = Transform3D(-0.896591, 0.345323, -0.277267, 0.104303, 0.773128, 0.625615, 0.430402, 0.532001, -0.729197, -0.297585, -0.374549, -1.68743)
|
transform = Transform3D(-0.896591, 0.345323, -0.277267, 0.104303, 0.773128, 0.625615, 0.430402, 0.532001, -0.729197, -0.297585, -0.374549, -1.68743)
|
||||||
|
|
||||||
@@ -82,11 +79,14 @@ transform = Transform3D(0.576019, 0, -0.817437, 0, 1, 0, 0.817437, 0, 0.576019,
|
|||||||
[node name="Ladder" parent="PHOTOGRAPHED" instance=ExtResource("2_yts0x")]
|
[node name="Ladder" parent="PHOTOGRAPHED" instance=ExtResource("2_yts0x")]
|
||||||
transform = Transform3D(-0.707107, 0, 0.707107, 0, 1, 0, -0.707107, 0, -0.707107, 0.0283049, -1.64915, -3.75383)
|
transform = Transform3D(-0.707107, 0, 0.707107, 0, 1, 0, -0.707107, 0, -0.707107, 0.0283049, -1.64915, -3.75383)
|
||||||
|
|
||||||
[node name="mac10" parent="PHOTOGRAPHED" instance=ExtResource("2_u0ggi")]
|
|
||||||
transform = Transform3D(-0.707107, 0, 0.707107, 0, 1, 0, -0.707107, 0, -0.707107, -0.0338004, 0.189329, -0.952258)
|
|
||||||
|
|
||||||
[node name="revolver1" parent="PHOTOGRAPHED" instance=ExtResource("3_yqo0y")]
|
[node name="revolver1" parent="PHOTOGRAPHED" instance=ExtResource("3_yqo0y")]
|
||||||
transform = Transform3D(-0.707107, -0.278797, 0.649825, 0, 0.918991, 0.394279, -0.707107, 0.278797, -0.649825, 0.116568, 0.0718296, -1.10969)
|
transform = Transform3D(-0.707107, -0.278797, 0.649825, 0, 0.918991, 0.394279, -0.707107, 0.278797, -0.649825, 0.116568, 0.0718296, -1.10969)
|
||||||
|
|
||||||
|
[node name="mac10" parent="PHOTOGRAPHED" instance=ExtResource("2_u0ggi")]
|
||||||
|
transform = Transform3D(-0.707107, 0, 0.707107, 0, 1, 0, -0.707107, 0, -0.707107, -0.0338004, 0.189329, -0.952258)
|
||||||
|
|
||||||
[node name="Blunderbus" parent="PHOTOGRAPHED" instance=ExtResource("7_do5lr")]
|
[node name="Blunderbus" parent="PHOTOGRAPHED" instance=ExtResource("7_do5lr")]
|
||||||
transform = Transform3D(-0.74921, 0, 0.662332, 0, 1, 0, -0.662332, 0, -0.74921, 0.125256, 2.38419e-07, -1.6817)
|
transform = Transform3D(-0.720177, 0.133439, 0.680837, -0.056748, 0.966712, -0.249495, -0.691466, -0.218317, -0.688631, 0.125256, 2.38419e-07, -1.6817)
|
||||||
|
|
||||||
|
[node name="RocketLauncher" parent="PHOTOGRAPHED" instance=ExtResource("2_i6mk3")]
|
||||||
|
transform = Transform3D(-0.785447, 0, 0.618929, 0, 1, 0, -0.618929, 0, -0.785447, -0.092602, -0.229299, -1.46618)
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
[gd_scene load_steps=2 format=3 uid="uid://dqgtnykkbngem"]
|
[gd_scene load_steps=4 format=3 uid="uid://dqgtnykkbngem"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://scripts/weapon_select.gd" id="1_qygnb"]
|
[ext_resource type="Script" path="res://scripts/weapon_select.gd" id="1_qygnb"]
|
||||||
|
[ext_resource type="Shader" path="res://assets/Shaders/blur.gdshader" id="2_25dbo"]
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_7gwrd"]
|
||||||
|
shader = ExtResource("2_25dbo")
|
||||||
|
shader_parameter/strength = 0.2
|
||||||
|
|
||||||
[node name="WeaponSelect" type="Control"]
|
[node name="WeaponSelect" type="Control"]
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
@@ -17,3 +22,19 @@ size_flags_horizontal = 4
|
|||||||
size_flags_vertical = 4
|
size_flags_vertical = 4
|
||||||
script = ExtResource("1_qygnb")
|
script = ExtResource("1_qygnb")
|
||||||
line_width = 2
|
line_width = 2
|
||||||
|
|
||||||
|
[node name="ColorRect2" type="ColorRect" parent="."]
|
||||||
|
z_index = -1
|
||||||
|
material = SubResource("ShaderMaterial_7gwrd")
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 8
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = -1920.0
|
||||||
|
offset_top = -1080.0
|
||||||
|
offset_right = 1920.0
|
||||||
|
offset_bottom = 1080.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|||||||
11
hud.tscn
@@ -23,6 +23,8 @@ bg_color = Color(1, 1, 1, 0.498039)
|
|||||||
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_ytfhs"]
|
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_ytfhs"]
|
||||||
|
|
||||||
[node name="HUD" type="Control"]
|
[node name="HUD" type="Control"]
|
||||||
|
light_mask = 2
|
||||||
|
visibility_layer = 2
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
@@ -38,7 +40,7 @@ anchors_preset = 2
|
|||||||
anchor_top = 1.0
|
anchor_top = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
offset_left = 44.975
|
offset_left = 44.975
|
||||||
offset_top = -247.09
|
offset_top = -273.09
|
||||||
offset_right = 244.975
|
offset_right = 244.975
|
||||||
offset_bottom = -142.09
|
offset_bottom = -142.09
|
||||||
grow_vertical = 0
|
grow_vertical = 0
|
||||||
@@ -136,8 +138,8 @@ anchor_left = 1.0
|
|||||||
anchor_top = 1.0
|
anchor_top = 1.0
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
offset_left = -584.0
|
offset_left = -734.0
|
||||||
offset_top = -314.0
|
offset_top = -372.0
|
||||||
grow_horizontal = 0
|
grow_horizontal = 0
|
||||||
grow_vertical = 0
|
grow_vertical = 0
|
||||||
theme = ExtResource("1_22trs")
|
theme = ExtResource("1_22trs")
|
||||||
@@ -152,6 +154,7 @@ size_flags_horizontal = 8
|
|||||||
size_flags_vertical = 8
|
size_flags_vertical = 8
|
||||||
theme = ExtResource("1_22trs")
|
theme = ExtResource("1_22trs")
|
||||||
theme_override_constants/separation = 10
|
theme_override_constants/separation = 10
|
||||||
|
alignment = 2
|
||||||
|
|
||||||
[node name="Gun Name" type="Label" parent="MarginContainer/VBoxContainer"]
|
[node name="Gun Name" type="Label" parent="MarginContainer/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
@@ -166,7 +169,7 @@ layout_mode = 2
|
|||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
theme = ExtResource("1_22trs")
|
theme = ExtResource("1_22trs")
|
||||||
theme_override_constants/separation = 50
|
theme_override_constants/separation = 50
|
||||||
alignment = 1
|
alignment = 2
|
||||||
|
|
||||||
[node name="AmmoCurrent" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer"]
|
[node name="AmmoCurrent" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ config_version=5
|
|||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="First Person Test"
|
config/name="First Person Test"
|
||||||
run/main_scene="res://assets/blockout_2.tscn"
|
run/main_scene="res://scenes/asset_checker.tscn"
|
||||||
config/features=PackedStringArray("4.3", "Forward Plus")
|
config/features=PackedStringArray("4.3", "Forward Plus")
|
||||||
config/icon="res://icon.svg"
|
config/icon="res://icon.svg"
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ extends StaticBody3D
|
|||||||
@export var ammo_amount = 20
|
@export var ammo_amount = 20
|
||||||
@onready var jump_sound = $JumpSound
|
@onready var jump_sound = $JumpSound
|
||||||
|
|
||||||
|
var can_jump = false
|
||||||
|
var player
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready():
|
func _ready():
|
||||||
pass # Replace with function body.
|
pass # Replace with function body.
|
||||||
@@ -12,14 +15,17 @@ func _ready():
|
|||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
pass
|
if can_jump:
|
||||||
|
if Input.is_action_just_pressed("jump"):
|
||||||
|
player.velocity.y = jump_amount
|
||||||
|
jump_sound.play()
|
||||||
|
|
||||||
|
|
||||||
func _on_area_3d_body_entered(body):
|
func _on_area_3d_body_entered(body):
|
||||||
if body.is_in_group("player"):
|
if body.is_in_group("player"):
|
||||||
body.velocity.y = jump_amount
|
can_jump = true
|
||||||
jump_sound.play()
|
player = body
|
||||||
if body.ammo < body.gun.max_ammo + ammo_amount:
|
|
||||||
body.ammo += ammo_amount
|
func _on_area_3d_body_exited(body: Node3D) -> void:
|
||||||
if stamina_replenish == true:
|
if body.is_in_group("player"):
|
||||||
body.remaining_stamina = body.MAX_STAMINA
|
can_jump = false
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ func _process(delta: float) -> void:
|
|||||||
fade_in_out(current_stam_bar,STAM_BAR_MAX_OPACITY,stam_bar_visible,5,delta)
|
fade_in_out(current_stam_bar,STAM_BAR_MAX_OPACITY,stam_bar_visible,5,delta)
|
||||||
|
|
||||||
func crosshair_size_change():
|
func crosshair_size_change():
|
||||||
crosshair_target += Vector2(40,40)
|
crosshair_target += Vector2(20,20)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ extends Control
|
|||||||
@onready var level_control = get_tree().current_scene
|
@onready var level_control = get_tree().current_scene
|
||||||
@onready var player: CharacterBody3D = $"../../../.."
|
@onready var player: CharacterBody3D = $"../../../.."
|
||||||
|
|
||||||
|
var paused
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
visible = false
|
visible = false
|
||||||
@@ -26,16 +28,20 @@ func _on_load_pressed() -> void:
|
|||||||
|
|
||||||
func _unhandled_input(event: InputEvent) -> void:
|
func _unhandled_input(event: InputEvent) -> void:
|
||||||
if Input.is_action_just_pressed("escape"):
|
if Input.is_action_just_pressed("escape"):
|
||||||
|
if paused:
|
||||||
|
resume()
|
||||||
|
else:
|
||||||
pause()
|
pause()
|
||||||
|
|
||||||
func pause():
|
func pause():
|
||||||
|
paused = true
|
||||||
get_tree().paused = true
|
get_tree().paused = true
|
||||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||||
player.toggle_hud(false)
|
player.toggle_hud(false)
|
||||||
player.pause_menu.show()
|
player.pause_menu.show()
|
||||||
|
|
||||||
|
|
||||||
func resume():
|
func resume():
|
||||||
|
paused = false
|
||||||
hide()
|
hide()
|
||||||
get_tree().paused = false
|
get_tree().paused = false
|
||||||
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||||
|
|||||||
@@ -492,12 +492,14 @@ func crouch(delta):
|
|||||||
|
|
||||||
func aim_down_sights(delta):
|
func aim_down_sights(delta):
|
||||||
if gun:
|
if gun:
|
||||||
if gun.ads == true:
|
|
||||||
if ads:
|
if ads:
|
||||||
|
if gun.ads == true:
|
||||||
camera.fov = lerp(camera.fov,BASE_FOV - float(gun.fov_zoom_amt),(delta * 5)/Engine.time_scale)
|
camera.fov = lerp(camera.fov,BASE_FOV - float(gun.fov_zoom_amt),(delta * 5)/Engine.time_scale)
|
||||||
gun.position = lerp(gun.position,ADS_POS,delta * 10 / Engine.time_scale)
|
gun.position = lerp(gun.position,ADS_POS,delta * 10 / Engine.time_scale)
|
||||||
else:
|
else:
|
||||||
gun.position = lerp(gun.position, weapon_start_pos,delta * 2)
|
gun.position = lerp(gun.position, weapon_start_pos,delta * 2)
|
||||||
|
camera.fov = lerp(camera.fov,BASE_FOV - float(gun.fov_zoom_amt),(delta * 5)/Engine.time_scale)
|
||||||
|
|
||||||
|
|
||||||
func _headbob(time) -> Vector3:
|
func _headbob(time) -> Vector3:
|
||||||
var pos = Vector3.ZERO
|
var pos = Vector3.ZERO
|
||||||
|
|||||||
@@ -56,6 +56,8 @@ func explode():
|
|||||||
if body.is_in_group("player"):
|
if body.is_in_group("player"):
|
||||||
body.velocity += clamp(blast_velocity,Vector3(-7,-7,-7),Vector3(7,7,7))
|
body.velocity += clamp(blast_velocity,Vector3(-7,-7,-7),Vector3(7,7,7))
|
||||||
body.recoil.add_recoil(Vector3(1,.1,.1),10,10)
|
body.recoil.add_recoil(Vector3(1,.1,.1),10,10)
|
||||||
|
if body.has_method("hit") and !body.is_in_group("player"):
|
||||||
|
body.hit(1)
|
||||||
if body.is_in_group("enemy"):
|
if body.is_in_group("enemy"):
|
||||||
body.knocked = true
|
body.knocked = true
|
||||||
body.stunned = true
|
body.stunned = true
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ func _on_body_entered(body: Node) -> void:
|
|||||||
if body.is_in_group("switch"):
|
if body.is_in_group("switch"):
|
||||||
body.hit(bullet_damage)
|
body.hit(bullet_damage)
|
||||||
|
|
||||||
|
if body.has_method("hit") and !body.is_in_group("player"):
|
||||||
|
body.hit(1)
|
||||||
|
|
||||||
if body.is_in_group("breakable"):
|
if body.is_in_group("breakable"):
|
||||||
var current_velocity = transform.basis * Vector3(0,0,-1 * bullet_force_mod)
|
var current_velocity = transform.basis * Vector3(0,0,-1 * bullet_force_mod)
|
||||||
body.breaking(current_velocity)
|
body.breaking(current_velocity)
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ func _on_area_3d_body_part_hit(dam,bullet_damage):
|
|||||||
func _on_prefire_timer_timeout():
|
func _on_prefire_timer_timeout():
|
||||||
fire(barrel_1)
|
fire(barrel_1)
|
||||||
smoke.emitting = true
|
smoke.emitting = true
|
||||||
#await get_tree().create_timer(.5).timeout # makes it too hard lol
|
await get_tree().create_timer(.01).timeout # makes it too hard lol
|
||||||
fire(barrel_2)
|
fire(barrel_2)
|
||||||
smoke_2.emitting = true
|
smoke_2.emitting = true
|
||||||
turret_material.emission_enabled = false
|
turret_material.emission_enabled = false
|
||||||
|
|||||||