This commit is contained in:
Spencer Killen 2023-01-02 23:18:07 -07:00
parent 303daf9f46
commit 2c2e5df6c7
Signed by: sjkillen
GPG Key ID: F307025B65C860BA
9 changed files with 86 additions and 26 deletions

View File

@ -1,16 +1,15 @@
[gd_scene load_steps=16 format=2]
[gd_scene load_steps=15 format=2]
[ext_resource path="res://assets/meat_bore/meat_tunnel_top.tscn" type="PackedScene" id=1]
[ext_resource path="res://assets/meat_bore/meat_module/meat_module.tscn" type="PackedScene" id=2]
[ext_resource path="res://assets/meat_bore/meat_module/level_wally.tscn" type="PackedScene" id=2]
[ext_resource path="res://player/player.tscn" type="PackedScene" id=3]
[ext_resource path="res://effects/WorldEnvironment.tscn" type="PackedScene" id=4]
[ext_resource path="res://effects/grainy_shader.tscn" type="PackedScene" id=5]
[ext_resource path="res://assets/Starbox3.png" type="Texture" id=6]
[ext_resource path="res://assets/meat_bore/meat_module/meat_module_outside_walls_3.png" type="Texture" id=7]
[ext_resource path="res://assets/meat_bore/meat_module/meat_module_outside_walls_5.png" type="Texture" id=8]
[ext_resource path="res://assets/meat_bore/meat_module/meat_module_outside_walls_1.png" type="Texture" id=9]
[ext_resource path="res://assets/meat_bore/meat_module/meat_module_outside_walls_2.png" type="Texture" id=10]
[ext_resource path="res://assets/meat_bore/meat_module/meat_module_outside_walls_4.png" type="Texture" id=11]
[ext_resource path="res://assets/meat_bore/meat_module/level_clark.tscn" type="PackedScene" id=7]
[ext_resource path="res://assets/meat_bore/meat_module/level_alexis.tscn" type="PackedScene" id=8]
[ext_resource path="res://assets/meat_bore/meat_module/level_lee.tscn" type="PackedScene" id=9]
[ext_resource path="res://assets/meat_bore/meat_module/level_jackie.tscn" type="PackedScene" id=10]
[ext_resource path="res://assets/models/meat_tentacle_small.tscn" type="PackedScene" id=12]
[ext_resource path="res://assets/models/meat_tentacle.tscn" type="PackedScene" id=13]
@ -48,25 +47,6 @@ glow_bloom = 1.0
[node name="meat_tunnel_top" parent="." instance=ExtResource( 1 )]
[node name="meat_module_1" parent="." instance=ExtResource( 2 )]
texture = ExtResource( 9 )
[node name="meat_module_2" parent="." instance=ExtResource( 2 )]
transform = Transform( 0.742409, 0, 0.669947, 0, 1, 0, -0.669947, 0, 0.742409, 0, -114.811, 0 )
texture = ExtResource( 10 )
[node name="meat_module_3" parent="." instance=ExtResource( 2 )]
transform = Transform( -0.341905, 0, -0.939734, 0, 1, 0, 0.939734, 0, -0.341905, 0, -229.622, 0 )
texture = ExtResource( 7 )
[node name="meat_module_4" parent="." instance=ExtResource( 2 )]
transform = Transform( 0.882693, 0, 0.469949, 0, 1, 0, -0.469949, 0, 0.882693, 0, -344.433, 0 )
texture = ExtResource( 11 )
[node name="meat_module_5" parent="." instance=ExtResource( 2 )]
transform = Transform( -0.968942, 0, 0.247287, 0, 1, 0, -0.247287, 0, -0.968942, 0, -459.244, 0 )
texture = ExtResource( 8 )
[node name="Player" parent="." instance=ExtResource( 3 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 21.3374, 30.1915 )
@ -137,3 +117,13 @@ transform = Transform( -0.452269, 0.152884, 0.254818, 0.141164, 0.62262, 0.00655
[node name="meat_tentacle_small2" parent="tentacle_cluster_5" instance=ExtResource( 12 )]
transform = Transform( -0.452271, 0.189509, 0.236865, -0.0433815, 0.487985, -0.377024, -0.302564, -0.324112, -0.389129, -1.93217, -0.560821, -0.363808 )
[node name="level_lee" parent="." instance=ExtResource( 9 )]
[node name="level_clark" parent="." instance=ExtResource( 7 )]
[node name="level_alexis" parent="." instance=ExtResource( 8 )]
[node name="level_wally" parent="." instance=ExtResource( 2 )]
[node name="level_jackie" parent="." instance=ExtResource( 10 )]

View File

@ -0,0 +1,12 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://assets/meat_bore/meat_module/meat_module.tscn" type="PackedScene" id=1]
[ext_resource path="res://assets/meat_bore/meat_module/meat_module.gd" type="Script" id=2]
[ext_resource path="res://assets/meat_bore/meat_module/meat_module_outside_walls_3.png" type="Texture" id=3]
[node name="level_alexis" type="Spatial"]
[node name="meat_module_3" type="Spatial" parent="." instance=ExtResource( 1 )]
transform = Transform( -0.341905, 0, -0.939734, 0, 1, 0, 0.939734, 0, -0.341905, 0, -229.622, 0 )
script = ExtResource( 2 )
texture = ExtResource( 3 )

View File

@ -0,0 +1,12 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://assets/meat_bore/meat_module/meat_module.tscn" type="PackedScene" id=1]
[ext_resource path="res://assets/meat_bore/meat_module/meat_module_outside_walls_2.png" type="Texture" id=2]
[ext_resource path="res://assets/meat_bore/meat_module/meat_module.gd" type="Script" id=3]
[node name="level_clark" type="Spatial"]
[node name="meat_module_2" type="Spatial" parent="." instance=ExtResource( 1 )]
transform = Transform( 0.742409, 0, 0.669947, 0, 1, 0, -0.669947, 0, 0.742409, 0, -114.811, 0 )
script = ExtResource( 3 )
texture = ExtResource( 2 )

View File

@ -0,0 +1,12 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://assets/meat_bore/meat_module/meat_module.tscn" type="PackedScene" id=1]
[ext_resource path="res://assets/meat_bore/meat_module/meat_module_outside_walls_5.png" type="Texture" id=2]
[ext_resource path="res://assets/meat_bore/meat_module/meat_module.gd" type="Script" id=3]
[node name="level_jackie" type="Spatial"]
[node name="meat_module_5" type="Spatial" parent="." instance=ExtResource( 1 )]
transform = Transform( -0.968942, 0, 0.247287, 0, 1, 0, -0.247287, 0, -0.968942, 0, -459.244, 0 )
script = ExtResource( 3 )
texture = ExtResource( 2 )

View File

@ -0,0 +1,11 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://assets/meat_bore/meat_module/meat_module.tscn" type="PackedScene" id=1]
[ext_resource path="res://assets/meat_bore/meat_module/meat_module_outside_walls_1.png" type="Texture" id=2]
[ext_resource path="res://assets/meat_bore/meat_module/meat_module.gd" type="Script" id=3]
[node name="level_lee" type="Spatial"]
[node name="meat_module_1" type="Spatial" parent="." instance=ExtResource( 1 )]
script = ExtResource( 3 )
texture = ExtResource( 2 )

View File

@ -0,0 +1,12 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://assets/meat_bore/meat_module/meat_module.tscn" type="PackedScene" id=1]
[ext_resource path="res://assets/meat_bore/meat_module/meat_module_outside_walls_4.png" type="Texture" id=2]
[ext_resource path="res://assets/meat_bore/meat_module/meat_module.gd" type="Script" id=3]
[node name="level_wally" type="Spatial"]
[node name="meat_module_4" type="Spatial" parent="." instance=ExtResource( 1 )]
transform = Transform( 0.882693, 0, 0.469949, 0, 1, 0, -0.469949, 0, 0.882693, 0, -344.433, 0 )
script = ExtResource( 3 )
texture = ExtResource( 2 )

View File

@ -18,6 +18,8 @@ export var jump_power: float = 50
export var sprint_factor: float = 3.5
export var walk_factor: float = 2.0
export var can_glide: bool = false
"public" var velocity: Vector3 = Vector3.ZERO
# Value changed by code only to add slow down or speed up effects
var velocity_factor: Vector3 = Vector3.ONE
@ -46,6 +48,8 @@ func process_velocity(delta: float):
# You can buffer jumps by pressing releaseing the space bar and then pressing it again
if not is_on_floor():
var grav = -gravity
if can_glide and Input.is_action_pressed("player_jump"):
grav /= 4
target_velocity.y = grav
# 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)

View File

@ -2,6 +2,8 @@ extends Spatial
onready var active_physics_node: Spatial = $OnFootPhysics
export var can_glide: bool = false
func _ready():
Util.player = self
@ -30,3 +32,7 @@ func set_physics_node(node: Spatial):
func objective_distance() -> float:
return $ObjectiveTracker.objective_distance
func _process(_delta):
$OnFootPhysics.can_glide = can_glide

View File

@ -47,3 +47,4 @@ shape = SubResource( 2 )
[node name="Player" parent="." instance=ExtResource( 1 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.566872, 2.73697 )
can_glide = true