factory room decoration

This commit is contained in:
Leon Palluch 2020-01-28 17:35:07 +01:00
parent b6c129897b
commit dca81e4726
4 changed files with 1212 additions and 129 deletions

View File

@ -85,6 +85,9 @@ func _ready():
Daytime.increase_per_second = 100 Daytime.increase_per_second = 100
Pills._decrease_per_second = 0.8 Pills._decrease_per_second = 0.8
if IsInFactory:
Daytime.increase_per_second = 0
# setup collisions with Meldewesen # setup collisions with Meldewesen
var area = get_node("InteractArea") as Area var area = get_node("InteractArea") as Area
assert(null != area) assert(null != area)
@ -229,6 +232,15 @@ func _on_area_entered (area: Area):
IsOutside = true IsOutside = true
# TODO: move not change_scene! # TODO: move not change_scene!
get_tree().change_scene("res://Level/World.tscn") get_tree().change_scene("res://Level/World.tscn")
elif area.is_in_group("LabyrinthEntry"):
Logger.info("entering labyrinth")
IsInFactory = false
IsInLabyrinth = true
# TODO: move not change_scene!
get_tree().change_scene("res://Level/Labyrinth.tscn")
func _on_area_exited (area: Area): func _on_area_exited (area: Area):

View File

@ -12,10 +12,8 @@ func _ready():
#Logger.set_logger_level(Logger.LOG_LEVEL_FINE) #Logger.set_logger_level(Logger.LOG_LEVEL_FINE)
_followPath = get_node("../") as PathFollow _followPath = get_node("../") as PathFollow
assert(null != _followPath)
_navPath = get_node("../../") as Path _navPath = get_node("../../") as Path
assert(null != _navPath)
var _interactArea = get_node("InteractArea") as Area var _interactArea = get_node("InteractArea") as Area
assert(null != _interactArea) assert(null != _interactArea)
@ -24,6 +22,7 @@ func _ready():
func _process(_delta): func _process(_delta):
# TODO: movement # TODO: movement
#if current_target: # should not be needed -> handled per navigation path #if current_target: # should not be needed -> handled per navigation path
if _followPath != null:
_followPath.offset += diffPerSecond * _delta _followPath.offset += diffPerSecond * _delta

File diff suppressed because one or more lines are too long

View File

@ -35,14 +35,14 @@ surfaces/0 = {
[sub_resource type="BoxShape" id=3] [sub_resource type="BoxShape" id=3]
[node name="Spatial" type="StaticBody" groups=[ [node name="StraightPipe" type="StaticBody" groups=[
"Pipes", "Pipes",
]] ]]
collision_layer = 7 collision_layer = 7
collision_mask = 7 collision_mask = 7
script = ExtResource( 1 ) script = ExtResource( 1 )
mesh_path = NodePath("Mesh") mesh_path = NodePath("../StraightPipe/Mesh")
color_cast_left = NodePath("ColorCast") color_cast_left = NodePath("../StraightPipe/ColorCast")
[node name="Mesh" type="MeshInstance" parent="."] [node name="Mesh" type="MeshInstance" parent="."]
transform = Transform( 0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, 0, 0 ) transform = Transform( 0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, 0, 0 )