All kinds of tweaks and minor fixes for release

This commit is contained in:
karl 2020-01-28 19:31:14 +01:00
parent ba38cde2a4
commit 74812a2a10
10 changed files with 91 additions and 84 deletions

View File

@ -68,7 +68,7 @@ func _ready():
break
assert(null != _playerRef)
_set_behavior()
change_visibility_cone_color(Color.green)
func _process(_delta):

File diff suppressed because one or more lines are too long

View File

@ -112,6 +112,7 @@ func _ready():
player.stream = load("res://Resources/Audio/cock.wav")
player.play()
func showMessage (text, duration):
_labelMessage.text = text
# animation
@ -301,8 +302,8 @@ func _on_respawn ():
Pills._set_level(Pills.get_max())
IsInFactory = false
IsOutside = true
# TODO: move not change_scene!
get_tree().change_scene("res://Level/OutsideWorld.tscn")
if not IsInLabyrinth:
get_tree().change_scene("res://Level/OutsideWorld.tscn")
_inventory.show() # enable hud again

View File

@ -158,7 +158,6 @@ random_pitch = 1.3
[node name="Player" type="KinematicBody" groups=[
"Player",
]]
editor/display_folded = true
collision_layer = 7
collision_mask = 7
script = ExtResource( 1 )
@ -179,7 +178,7 @@ script = ExtResource( 2 )
[node name="LookingAt" type="RayCast" parent="Body/PillCameras"]
transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0 )
enabled = true
cast_to = Vector3( 0, 0, 2 )
cast_to = Vector3( 0, 0, 4 )
collision_mask = 3
[node name="Listener" type="Listener" parent="Body/PillCameras"]

File diff suppressed because one or more lines are too long

View File

@ -74,7 +74,6 @@ extents = Vector3( 17.497, 2.35079, 14.7934 )
[node name="InFactory" type="Navigation"]
[node name="KeysCards" type="Spatial" parent="."]
editor/display_folded = true
[node name="Key" parent="KeysCards" instance=ExtResource( 1 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 27.7316, 1, -9.61762 )
@ -1768,6 +1767,10 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -47 )
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3, -2 )
shape = SubResource( 16 )
[node name="Key" parent="." instance=ExtResource( 1 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 61.4252, 0.317345, -41.4731 )
key_id = 7
[editable path="Architecture/FactoryRoomWalls/BackWallTrue/Door"]
[editable path="Architecture/FactoryRoomInterior/KeyThing/Key"]

View File

@ -38,8 +38,8 @@ surfaces/0 = {
[sub_resource type="BoxShape" id=3]
[node name="Key" type="StaticBody" groups=[
"Touchables",
"Collectibles",
"Touchables",
]]
script = ExtResource( 1 )

View File

@ -9,7 +9,7 @@
[sub_resource type="ArrayMesh" id=1]
resource_name = "Cube"
surfaces/0 = {
"aabb": AABB( 1, -1, -1, 1.00136e-005, 2, 2.00001 ),
"aabb": AABB( 1, -1, -1, 1.00136e-05, 2, 2.00001 ),
"array_data": PoolByteArray( 0, 0, 128, 63, 205, 204, 76, 191, 0, 0, 128, 63, 127, 0, 0, 0, 0, 0, 129, 127, 0, 0, 51, 59, 0, 0, 128, 63, 0, 0, 128, 191, 129, 202, 89, 63, 127, 0, 0, 0, 0, 0, 129, 127, 198, 44, 0, 60, 0, 0, 128, 63, 0, 0, 128, 191, 154, 153, 89, 191, 127, 0, 0, 0, 0, 0, 129, 127, 102, 59, 0, 60, 0, 0, 128, 63, 205, 204, 76, 191, 0, 0, 128, 191, 127, 0, 0, 0, 0, 0, 129, 127, 0, 60, 51, 59, 0, 0, 128, 63, 205, 204, 76, 63, 0, 0, 128, 191, 127, 0, 0, 0, 0, 0, 130, 127, 0, 60, 102, 46, 0, 0, 128, 63, 0, 0, 128, 63, 154, 153, 89, 191, 127, 0, 0, 0, 0, 0, 129, 127, 102, 59, 0, 0, 0, 0, 128, 63, 0, 0, 128, 63, 154, 153, 89, 63, 127, 0, 0, 0, 0, 0, 129, 127, 204, 44, 0, 0, 0, 0, 128, 63, 205, 204, 76, 63, 0, 0, 128, 63, 127, 0, 0, 0, 0, 0, 129, 127, 0, 0, 102, 46 ),
"array_index_data": PoolByteArray( 0, 0, 2, 0, 1, 0, 2, 0, 0, 0, 3, 0, 3, 0, 0, 0, 4, 0, 4, 0, 6, 0, 5, 0, 6, 0, 4, 0, 7, 0, 7, 0, 4, 0, 0, 0 ),
"blend_shape_data": [ ],
@ -51,6 +51,7 @@ surfaces/0 = {
[sub_resource type="BoxShape" id=3]
[node name="Keycard" type="StaticBody" groups=[
"Collectibles",
"Touchables",
]]
script = ExtResource( 1 )

View File

@ -117,7 +117,7 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -2.14131, 0, 101.825 )
[node name="Enemies" type="Spatial" parent="."]
[node name="Meldewesen2" parent="Enemies" instance=ExtResource( 3 )]
transform = Transform( -0.5, 0, -0.866026, 0, 1, 0, 0.866026, 0, -0.5, 0.962299, 0, 49.3728 )
transform = Transform( -0.5, 0, -0.866026, 0, 1, 0, 0.866026, 0, -0.5, 0.962299, 0.760091, 49.3728 )
[node name="Meldewesen3" parent="Enemies" instance=ExtResource( 3 )]
transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 66.7133, 0.850244, 5.86107 )
@ -342,7 +342,7 @@ mesh = SubResource( 10 )
material/0 = SubResource( 11 )
[node name="Masked" type="MeshInstance" parent="Environment"]
transform = Transform( 250, 0, 0, 0, 150, 0, 0, 0, 250, 0, -16, 0 )
transform = Transform( 250, 0, 0, 0, 150, 0, 0, 0, 250, 0, -16, 8.47912 )
mesh = SubResource( 12 )
material/0 = SubResource( 13 )

View File

@ -3,12 +3,13 @@ extends Spatial
export(NodePath) var _nodepath
export(float) var _offset
const SPAWN_TIME_MIN = 5000 # min spawntime in ms
const SPAWN_TIME_MAX = 8000 # max spawntime in ms
const SPAWN_TIME_MIN = 1000 # min spawntime in ms
const SPAWN_TIME_MAX = 3000 # max spawntime in ms
var _worker = preload("res://Characters/Worker/Worker.tscn")
var _lastSpawn = 0 # timestamp of last spawned worker
var _path: Path
var diff = 0
func _ready():
assert(null != _worker)
@ -16,10 +17,11 @@ func _ready():
_path = get_node(_nodepath)
assert(null != _path)
func _process(delta):
# spawns new workers after defined time
var cur_time = OS.get_ticks_msec()
var diff = rand_range(SPAWN_TIME_MIN, SPAWN_TIME_MAX)
if cur_time - _lastSpawn > diff:
#Logger.info(name + " spawning new worker")
var pathFollow = PathFollow.new()
@ -27,3 +29,5 @@ func _process(delta):
pathFollow.add_child(_worker.instance())
_path.add_child(pathFollow)
_lastSpawn = cur_time
diff = rand_range(SPAWN_TIME_MIN, SPAWN_TIME_MAX)