Merge branch 'master' of https://gitlab.hexaquo.at/mga/retrace
This commit is contained in:
commit
fb5b6da3d3
@ -7,4 +7,5 @@ onready var steps = [
|
|||||||
|
|
||||||
|
|
||||||
func play_footstep():
|
func play_footstep():
|
||||||
|
Logger.trace("Footstep")
|
||||||
steps[0].play()
|
steps[0].play()
|
@ -5,4 +5,6 @@ onready var screen_texture = get_node("ScreenTexture") as ColorRect
|
|||||||
|
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
screen_texture.material.set_shader_param("mask_factor", Pills.get_level() / Pills.get_max())
|
# The factor is 0 when the level is between 0% and 25%; 1 when the level is between 75% and 100%; lerp inbetween
|
||||||
|
var factor = clamp((Pills.get_level() / Pills.get_max() * 1.5 - 0.25), 0.0, 1.0)
|
||||||
|
screen_texture.material.set_shader_param("mask_factor", factor)
|
@ -54,6 +54,7 @@ func _ready():
|
|||||||
func _physics_process(delta):
|
func _physics_process(delta):
|
||||||
process_input()
|
process_input()
|
||||||
process_movement(delta)
|
process_movement(delta)
|
||||||
|
process_collision_layers()
|
||||||
|
|
||||||
func _process(_delta):
|
func _process(_delta):
|
||||||
check_interact()
|
check_interact()
|
||||||
@ -102,6 +103,17 @@ func process_animations():
|
|||||||
_animation.playback_speed = _vel.length() / MOVE_SPEED
|
_animation.playback_speed = _vel.length() / MOVE_SPEED
|
||||||
|
|
||||||
|
|
||||||
|
func process_collision_layers():
|
||||||
|
var new_layer: int = 6
|
||||||
|
|
||||||
|
if Pills.get_level() >= Pills.LEVELS.VERY_LOW:
|
||||||
|
# If the masked view is almost invisible, collision with masked objects is disabled
|
||||||
|
new_layer -= 1 # See collision layer names in editor
|
||||||
|
|
||||||
|
collision_layer = new_layer
|
||||||
|
collision_mask = new_layer
|
||||||
|
|
||||||
|
|
||||||
func check_interact():
|
func check_interact():
|
||||||
if _lookCast.is_colliding():
|
if _lookCast.is_colliding():
|
||||||
var collider = _lookCast.get_collider()
|
var collider = _lookCast.get_collider()
|
||||||
|
@ -104,8 +104,8 @@ random_pitch = 1.3
|
|||||||
[node name="Player" type="KinematicBody" groups=[
|
[node name="Player" type="KinematicBody" groups=[
|
||||||
"Player",
|
"Player",
|
||||||
]]
|
]]
|
||||||
collision_layer = 5
|
collision_layer = 7
|
||||||
collision_mask = 5
|
collision_mask = 7
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
body_nodepath = NodePath("Body")
|
body_nodepath = NodePath("Body")
|
||||||
lookingAt_nodepath = NodePath("Body/PillCameras/LookingAt")
|
lookingAt_nodepath = NodePath("Body/PillCameras/LookingAt")
|
||||||
@ -130,20 +130,26 @@ current = true
|
|||||||
[node name="TrueView" type="Viewport" parent="Body/PillCameras"]
|
[node name="TrueView" type="Viewport" parent="Body/PillCameras"]
|
||||||
size = Vector2( 1024, 600 )
|
size = Vector2( 1024, 600 )
|
||||||
render_target_update_mode = 3
|
render_target_update_mode = 3
|
||||||
|
shadow_atlas_size = 4
|
||||||
|
|
||||||
[node name="TrueCamera" type="Camera" parent="Body/PillCameras/TrueView"]
|
[node name="TrueCamera" type="Camera" parent="Body/PillCameras/TrueView"]
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 7.45058e-009, 1.8, 0 )
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 7.45058e-009, 1.8, 0 )
|
||||||
cull_mask = 2
|
cull_mask = 2
|
||||||
current = true
|
current = true
|
||||||
|
fov = 80.0
|
||||||
|
far = 2000.0
|
||||||
|
|
||||||
[node name="MaskedView" type="Viewport" parent="Body/PillCameras"]
|
[node name="MaskedView" type="Viewport" parent="Body/PillCameras"]
|
||||||
size = Vector2( 1024, 600 )
|
size = Vector2( 1024, 600 )
|
||||||
render_target_update_mode = 3
|
render_target_update_mode = 3
|
||||||
|
shadow_atlas_size = 4
|
||||||
|
|
||||||
[node name="MaskedCamera" type="Camera" parent="Body/PillCameras/MaskedView"]
|
[node name="MaskedCamera" type="Camera" parent="Body/PillCameras/MaskedView"]
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 7.45058e-009, 1.8, 0 )
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 7.45058e-009, 1.8, 0 )
|
||||||
cull_mask = 1
|
cull_mask = 1
|
||||||
current = true
|
current = true
|
||||||
|
fov = 80.0
|
||||||
|
far = 2000.0
|
||||||
|
|
||||||
[node name="ScreenTexture" type="ColorRect" parent="Body/PillCameras"]
|
[node name="ScreenTexture" type="ColorRect" parent="Body/PillCameras"]
|
||||||
material = SubResource( 3 )
|
material = SubResource( 3 )
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=3 format=2]
|
[gd_scene load_steps=4 format=2]
|
||||||
|
|
||||||
[sub_resource type="CubeMesh" id=1]
|
[sub_resource type="CubeMesh" id=1]
|
||||||
size = Vector3( 26, 12, 14 )
|
size = Vector3( 26, 12, 14 )
|
||||||
@ -6,9 +6,17 @@ size = Vector3( 26, 12, 14 )
|
|||||||
[sub_resource type="SpatialMaterial" id=2]
|
[sub_resource type="SpatialMaterial" id=2]
|
||||||
albedo_color = Color( 1, 0.917647, 0.537255, 1 )
|
albedo_color = Color( 1, 0.917647, 0.537255, 1 )
|
||||||
|
|
||||||
|
[sub_resource type="ConcavePolygonShape" id=3]
|
||||||
|
data = PoolVector3Array( -13, 6, 7, 13, 6, 7, -13, -6, 7, 13, 6, 7, 13, -6, 7, -13, -6, 7, 13, 6, -7, -13, 6, -7, 13, -6, -7, -13, 6, -7, -13, -6, -7, 13, -6, -7, 13, 6, 7, 13, 6, -7, 13, -6, 7, 13, 6, -7, 13, -6, -7, 13, -6, 7, -13, 6, -7, -13, 6, 7, -13, -6, -7, -13, 6, 7, -13, -6, 7, -13, -6, -7, 13, 6, 7, -13, 6, 7, 13, 6, -7, -13, 6, 7, -13, 6, -7, 13, 6, -7, -13, -6, 7, 13, -6, 7, -13, -6, -7, 13, -6, 7, 13, -6, -7, -13, -6, -7 )
|
||||||
|
|
||||||
[node name="BuildingBlock" type="Spatial"]
|
[node name="BuildingBlock" type="Spatial"]
|
||||||
|
|
||||||
[node name="MeshInstance" type="MeshInstance" parent="."]
|
[node name="MeshInstance" type="MeshInstance" parent="."]
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 6, 0 )
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 6, 0 )
|
||||||
mesh = SubResource( 1 )
|
mesh = SubResource( 1 )
|
||||||
material/0 = SubResource( 2 )
|
material/0 = SubResource( 2 )
|
||||||
|
|
||||||
|
[node name="StaticBody" type="StaticBody" parent="MeshInstance"]
|
||||||
|
|
||||||
|
[node name="CollisionShape" type="CollisionShape" parent="MeshInstance/StaticBody"]
|
||||||
|
shape = SubResource( 3 )
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[gd_scene load_steps=2 format=2]
|
[gd_scene load_steps=2 format=2]
|
||||||
|
|
||||||
[sub_resource type="CylinderMesh" id=4]
|
[sub_resource type="CylinderMesh" id=1]
|
||||||
top_radius = 20.0
|
top_radius = 20.0
|
||||||
bottom_radius = 35.0
|
bottom_radius = 35.0
|
||||||
height = 100.0
|
height = 100.0
|
||||||
@ -10,15 +10,15 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -185, 0, -191 )
|
|||||||
|
|
||||||
[node name="MeshInstance" type="MeshInstance" parent="."]
|
[node name="MeshInstance" type="MeshInstance" parent="."]
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 0 )
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 0 )
|
||||||
mesh = SubResource( 4 )
|
mesh = SubResource( 1 )
|
||||||
material/0 = null
|
material/0 = null
|
||||||
|
|
||||||
[node name="MeshInstance2" type="MeshInstance" parent="."]
|
[node name="MeshInstance2" type="MeshInstance" parent="."]
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 50, 60 )
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 50, 60 )
|
||||||
mesh = SubResource( 4 )
|
mesh = SubResource( 1 )
|
||||||
material/0 = null
|
material/0 = null
|
||||||
|
|
||||||
[node name="MeshInstance3" type="MeshInstance" parent="."]
|
[node name="MeshInstance3" type="MeshInstance" parent="."]
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 50, -60 )
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 50, -60 )
|
||||||
mesh = SubResource( 4 )
|
mesh = SubResource( 1 )
|
||||||
material/0 = null
|
material/0 = null
|
||||||
|
File diff suppressed because one or more lines are too long
BIN
Models/pill/pill101blend.glb
Normal file
BIN
Models/pill/pill101blend.glb
Normal file
Binary file not shown.
1062
Models/pill/pill101blend.glb.import
Normal file
1062
Models/pill/pill101blend.glb.import
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Resources/Audio/DoorClose.wav
Normal file
BIN
Resources/Audio/DoorClose.wav
Normal file
Binary file not shown.
21
Resources/Audio/DoorClose.wav.import
Normal file
21
Resources/Audio/DoorClose.wav.import
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamSample"
|
||||||
|
path="res://.import/DoorClose.wav-a42279a23e15223438fad3653a5f11d2.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Resources/Audio/DoorClose.wav"
|
||||||
|
dest_files=[ "res://.import/DoorClose.wav-a42279a23e15223438fad3653a5f11d2.sample" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
force/8_bit=false
|
||||||
|
force/mono=false
|
||||||
|
force/max_rate=false
|
||||||
|
force/max_rate_hz=44100
|
||||||
|
edit/trim=true
|
||||||
|
edit/normalize=true
|
||||||
|
edit/loop=false
|
||||||
|
compress/mode=0
|
BIN
Resources/Audio/DoorOpen.wav
Normal file
BIN
Resources/Audio/DoorOpen.wav
Normal file
Binary file not shown.
21
Resources/Audio/DoorOpen.wav.import
Normal file
21
Resources/Audio/DoorOpen.wav.import
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamSample"
|
||||||
|
path="res://.import/DoorOpen.wav-053df945fc1e6b8ed535511515244f05.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Resources/Audio/DoorOpen.wav"
|
||||||
|
dest_files=[ "res://.import/DoorOpen.wav-053df945fc1e6b8ed535511515244f05.sample" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
force/8_bit=false
|
||||||
|
force/mono=false
|
||||||
|
force/max_rate=false
|
||||||
|
force/max_rate_hz=44100
|
||||||
|
edit/trim=true
|
||||||
|
edit/normalize=true
|
||||||
|
edit/loop=false
|
||||||
|
compress/mode=0
|
43
Things/pills/Pills.tscn
Normal file
43
Things/pills/Pills.tscn
Normal file
File diff suppressed because one or more lines are too long
@ -63,7 +63,7 @@ _global_script_class_icons={
|
|||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="retrace"
|
config/name="retrace"
|
||||||
run/main_scene="res://Level/PathTestWorld.tscn"
|
run/main_scene="res://Level/World.tscn"
|
||||||
config/icon="res://icon.png"
|
config/icon="res://icon.png"
|
||||||
|
|
||||||
[autoload]
|
[autoload]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user