Compare commits
2 Commits
2c2e5df6c7
...
22ac0db4aa
Author | SHA1 | Date |
---|---|---|
Spencer Killen | 22ac0db4aa | |
dukegoobler | 5782bbc2c3 |
|
@ -0,0 +1,15 @@
|
||||||
|
extends Area
|
||||||
|
|
||||||
|
var phase = 0
|
||||||
|
var dialog = null
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
func _on_DialogTrigger_body_entered(body):
|
||||||
|
dialog = Dialogic.start("elevator")
|
||||||
|
add_child(dialog)
|
||||||
|
|
||||||
|
func _on_DialogTrigger_body_exited(body):
|
||||||
|
if dialog != null:
|
||||||
|
dialog = null
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=25 format=2]
|
[gd_scene load_steps=27 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://assets/meat_creek/side_tunnel_1.glb" type="PackedScene" id=1]
|
[ext_resource path="res://assets/meat_creek/side_tunnel_1.glb" type="PackedScene" id=1]
|
||||||
[ext_resource path="res://player/player.tscn" type="PackedScene" id=2]
|
[ext_resource path="res://player/player.tscn" type="PackedScene" id=2]
|
||||||
|
@ -21,6 +21,7 @@
|
||||||
[ext_resource path="res://assets/models/black_box/black_box.tscn" type="PackedScene" id=19]
|
[ext_resource path="res://assets/models/black_box/black_box.tscn" type="PackedScene" id=19]
|
||||||
[ext_resource path="res://assets/models/obelisk/obelisk.tscn" type="PackedScene" id=20]
|
[ext_resource path="res://assets/models/obelisk/obelisk.tscn" type="PackedScene" id=20]
|
||||||
[ext_resource path="res://assets/models/meat_tentacle_small.tscn" type="PackedScene" id=21]
|
[ext_resource path="res://assets/models/meat_tentacle_small.tscn" type="PackedScene" id=21]
|
||||||
|
[ext_resource path="res://assets/meat_creek/DialogTrigger.gd" type="Script" id=22]
|
||||||
[ext_resource path="res://assets/models/meat_tentacle.tscn" type="PackedScene" id=400]
|
[ext_resource path="res://assets/models/meat_tentacle.tscn" type="PackedScene" id=400]
|
||||||
|
|
||||||
[sub_resource type="PanoramaSky" id=4]
|
[sub_resource type="PanoramaSky" id=4]
|
||||||
|
@ -54,6 +55,8 @@ dof_blur_near_quality = 2
|
||||||
glow_enabled = true
|
glow_enabled = true
|
||||||
glow_bloom = 1.0
|
glow_bloom = 1.0
|
||||||
|
|
||||||
|
[sub_resource type="BoxShape" id=5]
|
||||||
|
|
||||||
[node name="side_tunnel_1" instance=ExtResource( 1 )]
|
[node name="side_tunnel_1" instance=ExtResource( 1 )]
|
||||||
|
|
||||||
[node name="StaticBody" parent="Canvas001" index="0" instance=ExtResource( 8 )]
|
[node name="StaticBody" parent="Canvas001" index="0" instance=ExtResource( 8 )]
|
||||||
|
@ -327,6 +330,14 @@ id = 4
|
||||||
[node name="elevator" parent="." index="10" instance=ExtResource( 10 )]
|
[node name="elevator" parent="." index="10" instance=ExtResource( 10 )]
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0735546, -123.027, -41.1766 )
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0735546, -123.027, -41.1766 )
|
||||||
|
|
||||||
|
[node name="DialogTrigger" type="Area" parent="elevator" index="1"]
|
||||||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.44246, 0 )
|
||||||
|
script = ExtResource( 22 )
|
||||||
|
|
||||||
|
[node name="CollisionShape" type="CollisionShape" parent="elevator/DialogTrigger" index="0"]
|
||||||
|
transform = Transform( 1e+06, 0, 0, 0, 0, 0, 0, 0, 1e+06, 0, 0, 0 )
|
||||||
|
shape = SubResource( 5 )
|
||||||
|
|
||||||
[node name="SignalGenerator" parent="." index="11" instance=ExtResource( 12 )]
|
[node name="SignalGenerator" parent="." index="11" instance=ExtResource( 12 )]
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.489914, -122.635, -41.5684 )
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.489914, -122.635, -41.5684 )
|
||||||
stream = ExtResource( 16 )
|
stream = ExtResource( 16 )
|
||||||
|
@ -361,6 +372,8 @@ max_wait = 30.0
|
||||||
[node name="Timer" type="Timer" parent="AmbientSounds/BottomWhale2" index="0"]
|
[node name="Timer" type="Timer" parent="AmbientSounds/BottomWhale2" index="0"]
|
||||||
one_shot = true
|
one_shot = true
|
||||||
|
|
||||||
|
[connection signal="body_entered" from="elevator/DialogTrigger" to="elevator/DialogTrigger" method="_on_DialogTrigger_body_entered"]
|
||||||
|
[connection signal="body_exited" from="elevator/DialogTrigger" to="elevator/DialogTrigger" method="_on_DialogTrigger_body_exited"]
|
||||||
[connection signal="finished" from="AmbientSounds/BottomWhale1" to="AmbientSounds/BottomWhale1" method="_on_sound_finished"]
|
[connection signal="finished" from="AmbientSounds/BottomWhale1" to="AmbientSounds/BottomWhale1" method="_on_sound_finished"]
|
||||||
[connection signal="timeout" from="AmbientSounds/BottomWhale1/Timer" to="AmbientSounds/BottomWhale1" method="_on_Timer_timeout"]
|
[connection signal="timeout" from="AmbientSounds/BottomWhale1/Timer" to="AmbientSounds/BottomWhale1" method="_on_Timer_timeout"]
|
||||||
[connection signal="finished" from="AmbientSounds/BottomWhale2" to="AmbientSounds/BottomWhale2" method="_on_sound_finished"]
|
[connection signal="finished" from="AmbientSounds/BottomWhale2" to="AmbientSounds/BottomWhale2" method="_on_sound_finished"]
|
||||||
|
|
Binary file not shown.
|
@ -72,7 +72,8 @@
|
||||||
"timeline-1672267872.json",
|
"timeline-1672267872.json",
|
||||||
"timeline-1672267892.json",
|
"timeline-1672267892.json",
|
||||||
"timeline-1672623960.json",
|
"timeline-1672623960.json",
|
||||||
"timeline-1672719153.json"
|
"timeline-1672719153.json",
|
||||||
|
"timeline-1672725696.json"
|
||||||
],
|
],
|
||||||
"folders": {
|
"folders": {
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
"events": [
|
||||||
|
{
|
||||||
|
"event_id": "dialogic_024",
|
||||||
|
"set_theme": "default-theme.cfg"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"character": "",
|
||||||
|
"event_id": "dialogic_001",
|
||||||
|
"portrait": "",
|
||||||
|
"text": "(Where am I?)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"character": "",
|
||||||
|
"event_id": "dialogic_001",
|
||||||
|
"portrait": "",
|
||||||
|
"text": "(Looks the the only way out is down...)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"dialogic-version": "1.4.5",
|
||||||
|
"file": "timeline-1672725696.json",
|
||||||
|
"name": "elevator"
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,6 +5,7 @@ onready var util = get_node("/root/Util")
|
||||||
export var gravity: float = 6.0
|
export var gravity: float = 6.0
|
||||||
# When falling, gravity is artificially increased
|
# When falling, gravity is artificially increased
|
||||||
export var gravity_downwards_factor: float = 3
|
export var gravity_downwards_factor: float = 3
|
||||||
|
export var float_factor = 0.5
|
||||||
export var ground_gravity: float = 3.1
|
export var ground_gravity: float = 3.1
|
||||||
# Rate of gaining speed
|
# Rate of gaining speed
|
||||||
export var velocity_acceleration_xz: float = 3
|
export var velocity_acceleration_xz: float = 3
|
||||||
|
@ -19,6 +20,7 @@ export var sprint_factor: float = 3.5
|
||||||
export var walk_factor: float = 2.0
|
export var walk_factor: float = 2.0
|
||||||
|
|
||||||
export var can_glide: bool = false
|
export var can_glide: bool = false
|
||||||
|
export var can_float: bool = false
|
||||||
|
|
||||||
"public" var velocity: Vector3 = Vector3.ZERO
|
"public" var velocity: Vector3 = Vector3.ZERO
|
||||||
# Value changed by code only to add slow down or speed up effects
|
# Value changed by code only to add slow down or speed up effects
|
||||||
|
@ -52,7 +54,10 @@ func process_velocity(delta: float):
|
||||||
grav /= 4
|
grav /= 4
|
||||||
target_velocity.y = grav
|
target_velocity.y = grav
|
||||||
# Gravity is stronger when you're falling. Feels nicer
|
# Gravity is stronger when you're falling. Feels nicer
|
||||||
target_velocity.y *= util.clamped_lerp(gravity_downwards_factor, 1.0, velocity.y/2, 0.0)
|
var gdf = gravity_downwards_factor
|
||||||
|
if can_float and Input.is_action_pressed("player_jump"):
|
||||||
|
gdf = float_factor
|
||||||
|
target_velocity.y *= util.clamped_lerp(gdf, 1.0, velocity.y/2, 0.0)
|
||||||
else:
|
else:
|
||||||
velocity.y = max(0.0, velocity.y)
|
velocity.y = max(0.0, velocity.y)
|
||||||
target_velocity.y = max(0.0, max(target_velocity.y, jump_power * $"../MovementInput".jump_intent * jump_permission))
|
target_velocity.y = max(0.0, max(target_velocity.y, jump_power * $"../MovementInput".jump_intent * jump_permission))
|
||||||
|
|
|
@ -3,6 +3,8 @@ extends Spatial
|
||||||
onready var active_physics_node: Spatial = $OnFootPhysics
|
onready var active_physics_node: Spatial = $OnFootPhysics
|
||||||
|
|
||||||
export var can_glide: bool = false
|
export var can_glide: bool = false
|
||||||
|
export var can_float: bool = false
|
||||||
|
export var float_factor = 0.5
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
Util.player = self
|
Util.player = self
|
||||||
|
@ -35,4 +37,7 @@ func objective_distance() -> float:
|
||||||
|
|
||||||
func _process(_delta):
|
func _process(_delta):
|
||||||
$OnFootPhysics.can_glide = can_glide
|
$OnFootPhysics.can_glide = can_glide
|
||||||
|
$OnFootPhysics.can_float = can_float
|
||||||
|
$OnFootPhysics.float_factor = float_factor
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue