fixed lever
outline-refactoring
This commit is contained in:
parent
0d37f1076d
commit
f2dbcc91a5
@ -17,7 +17,7 @@ func _ready():
|
|||||||
|
|
||||||
|
|
||||||
func _on_body_entered_visibility(body: PhysicsBody):
|
func _on_body_entered_visibility(body: PhysicsBody):
|
||||||
Logger.trace("Meldewesen seeing %s" % [body])
|
#Logger.trace("Meldewesen seeing %s" % [body])
|
||||||
|
|
||||||
if body.is_in_group("Player"):
|
if body.is_in_group("Player"):
|
||||||
Logger.info("Seeing player!")
|
Logger.info("Seeing player!")
|
||||||
|
@ -7,5 +7,5 @@ onready var steps = [
|
|||||||
|
|
||||||
|
|
||||||
func play_footstep():
|
func play_footstep():
|
||||||
Logger.trace("Footstep")
|
#Logger.trace("Footstep")
|
||||||
steps[0].play()
|
steps[0].play()
|
@ -1,17 +1,16 @@
|
|||||||
extends Spatial
|
extends Spatial
|
||||||
|
|
||||||
var _animationWalk: AnimationPlayer
|
var _animation: AnimationPlayer
|
||||||
|
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
_animationWalk = get_parent().get_node("PillAnimationPlayer") as AnimationPlayer
|
_animation = get_parent().get_node("PillAnimationPlayer") as AnimationPlayer
|
||||||
assert(null != _animationWalk)
|
assert(null != _animation)
|
||||||
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
# Taking a pill
|
# Taking a pill
|
||||||
if Input.is_action_just_pressed("take_pill"):
|
if Input.is_action_just_pressed("take_pill"):
|
||||||
Pills.take_pill()
|
Pills.take_pill()
|
||||||
Logger.info("Player took a pill; new level: %s" % [Pills.get_round_level()])
|
Logger.info("Player took a pill; new level: %s" % [Pills.get_round_level()])
|
||||||
_animationWalk.play("PillTaking")
|
_animation.play("PillTaking")
|
@ -26,6 +26,7 @@ var _camera: Camera
|
|||||||
var _lookCast: RayCast
|
var _lookCast: RayCast
|
||||||
var _animationWalk: AnimationPlayer
|
var _animationWalk: AnimationPlayer
|
||||||
var _animationFadeOut: AnimationPlayer
|
var _animationFadeOut: AnimationPlayer
|
||||||
|
var _labelInteract: Label
|
||||||
var _dir = Vector3();
|
var _dir = Vector3();
|
||||||
var _vel = Vector3();
|
var _vel = Vector3();
|
||||||
var _is_sprinting : bool;
|
var _is_sprinting : bool;
|
||||||
@ -39,7 +40,7 @@ func _ready():
|
|||||||
_body = get_node(body_nodepath) as Spatial # = $Body
|
_body = get_node(body_nodepath) as Spatial # = $Body
|
||||||
assert(null != _body)
|
assert(null != _body)
|
||||||
|
|
||||||
_camera = get_node(camera_nodepath)
|
_camera = get_node(camera_nodepath) #as Camera
|
||||||
assert(null != _camera)
|
assert(null != _camera)
|
||||||
|
|
||||||
_animationWalk = get_node(animationWalk_nodepath) as AnimationPlayer
|
_animationWalk = get_node(animationWalk_nodepath) as AnimationPlayer
|
||||||
@ -48,6 +49,9 @@ func _ready():
|
|||||||
_animationFadeOut = get_node(animationFadeOut_nodepath) as AnimationPlayer
|
_animationFadeOut = get_node(animationFadeOut_nodepath) as AnimationPlayer
|
||||||
assert(null != _animationFadeOut)
|
assert(null != _animationFadeOut)
|
||||||
|
|
||||||
|
_labelInteract = get_node(ui_interact_nodepath) as Label
|
||||||
|
assert(null != _labelInteract)
|
||||||
|
|
||||||
# Setup mouse look
|
# Setup mouse look
|
||||||
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||||
_lookCast = get_node(lookingAt_nodepath) as RayCast
|
_lookCast = get_node(lookingAt_nodepath) as RayCast
|
||||||
@ -130,31 +134,32 @@ func check_interact():
|
|||||||
|
|
||||||
if null != collider and collider.is_in_group("Touchables"):
|
if null != collider and collider.is_in_group("Touchables"):
|
||||||
#show interact tooltip
|
#show interact tooltip
|
||||||
get_node(ui_interact_nodepath).show()
|
_labelInteract.show()
|
||||||
|
|
||||||
#enable outline of seen object
|
#enable outline of seen object
|
||||||
collider.get_node(collider.outline_path).show()
|
collider.outline.show()
|
||||||
if _prev_look != null and is_instance_valid(_prev_look):
|
if _prev_look != null and is_instance_valid(_prev_look):
|
||||||
if _prev_look != collider:
|
if _prev_look != collider:
|
||||||
_prev_look.get_node(_prev_look.outline_path).hide()
|
_prev_look.outline.hide()
|
||||||
_prev_look = collider
|
_prev_look = collider
|
||||||
|
|
||||||
#do interaction
|
#do interaction
|
||||||
if Input.is_action_just_pressed("interact"):
|
if Input.is_action_just_pressed("interact"):
|
||||||
collider.do_interact(self)
|
collider.do_interact(self)
|
||||||
_inventory.add_item(collider.name)
|
if collider.is_in_group("Collectibles"):
|
||||||
|
_inventory.add_item(collider.name)
|
||||||
else:
|
else:
|
||||||
#stop showing interact tooltip and disable outline
|
#stop showing interact tooltip and disable outline
|
||||||
get_node(ui_interact_nodepath).hide()
|
_labelInteract.hide()
|
||||||
if _prev_look != null and is_instance_valid(_prev_look):
|
if _prev_look != null and is_instance_valid(_prev_look):
|
||||||
_prev_look.get_node(_prev_look.outline_path).hide()
|
_prev_look.outline.hide()
|
||||||
elif _prev_look != null and is_instance_valid(_prev_look):
|
elif _prev_look != null and is_instance_valid(_prev_look):
|
||||||
#disable outline of last seen object
|
#disable outline of last seen object
|
||||||
_prev_look.get_node(_prev_look.outline_path).hide()
|
_prev_look.outline.hide()
|
||||||
_prev_look = null
|
_prev_look = null
|
||||||
|
|
||||||
#stop showing interact tooltip
|
#stop showing interact tooltip
|
||||||
get_node(ui_interact_nodepath).hide()
|
_labelInteract.hide()
|
||||||
|
|
||||||
|
|
||||||
func _input(event):
|
func _input(event):
|
||||||
|
@ -150,11 +150,11 @@ tracks/0/keys = {
|
|||||||
"values": [ 1.0, 0.5, 0.7, 0.0 ]
|
"values": [ 1.0, 0.5, 0.7, 0.0 ]
|
||||||
}
|
}
|
||||||
|
|
||||||
[sub_resource type="AudioStreamRandomPitch" id=10]
|
[sub_resource type="AudioStreamRandomPitch" id=9]
|
||||||
audio_stream = ExtResource( 9 )
|
audio_stream = ExtResource( 9 )
|
||||||
random_pitch = 1.3
|
random_pitch = 1.3
|
||||||
|
|
||||||
[sub_resource type="CylinderShape" id=11]
|
[sub_resource type="CylinderShape" id=10]
|
||||||
|
|
||||||
[node name="Player" type="KinematicBody" groups=[
|
[node name="Player" type="KinematicBody" groups=[
|
||||||
"Player",
|
"Player",
|
||||||
@ -184,6 +184,7 @@ cast_to = Vector3( 0, 0, 2 )
|
|||||||
current = true
|
current = true
|
||||||
|
|
||||||
[node name="TrueView" type="Viewport" parent="Body/PillCameras"]
|
[node name="TrueView" type="Viewport" parent="Body/PillCameras"]
|
||||||
|
editor/display_folded = true
|
||||||
size = Vector2( 1024, 600 )
|
size = Vector2( 1024, 600 )
|
||||||
render_target_update_mode = 3
|
render_target_update_mode = 3
|
||||||
audio_listener_enable_3d = true
|
audio_listener_enable_3d = true
|
||||||
@ -194,6 +195,7 @@ cull_mask = 2
|
|||||||
current = true
|
current = true
|
||||||
|
|
||||||
[node name="MaskedView" type="Viewport" parent="Body/PillCameras"]
|
[node name="MaskedView" type="Viewport" parent="Body/PillCameras"]
|
||||||
|
editor/display_folded = true
|
||||||
size = Vector2( 1024, 600 )
|
size = Vector2( 1024, 600 )
|
||||||
render_target_update_mode = 3
|
render_target_update_mode = 3
|
||||||
audio_listener_enable_3d = true
|
audio_listener_enable_3d = true
|
||||||
@ -254,7 +256,7 @@ script = ExtResource( 8 )
|
|||||||
|
|
||||||
[node name="Footstep1" type="AudioStreamPlayer3D" parent="Footsteps"]
|
[node name="Footstep1" type="AudioStreamPlayer3D" parent="Footsteps"]
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1 )
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1 )
|
||||||
stream = SubResource( 10 )
|
stream = SubResource( 9 )
|
||||||
unit_db = -25.0
|
unit_db = -25.0
|
||||||
pitch_scale = 1.5
|
pitch_scale = 1.5
|
||||||
|
|
||||||
@ -273,6 +275,6 @@ visible = false
|
|||||||
|
|
||||||
[node name="CollisionShape" type="CollisionShape" parent="InteractArea"]
|
[node name="CollisionShape" type="CollisionShape" parent="InteractArea"]
|
||||||
transform = Transform( 1.2, 0, 0, 0, 1, 0, 0, 0, 1.2, 0, 1, 0 )
|
transform = Transform( 1.2, 0, 0, 0, 1, 0, 0, 0, 1.2, 0, 1, 0 )
|
||||||
shape = SubResource( 11 )
|
shape = SubResource( 10 )
|
||||||
|
|
||||||
[editable path="HUD"]
|
[editable path="HUD"]
|
||||||
|
@ -4,6 +4,9 @@ var _container: GridContainer
|
|||||||
var _labelPillLevel: Label
|
var _labelPillLevel: Label
|
||||||
var _pillLevel: TextureProgress
|
var _pillLevel: TextureProgress
|
||||||
|
|
||||||
|
onready var _keyTexture = load("res://Resources/Models/key/key.png")
|
||||||
|
onready var _cardTexture = load("res://Resources/Models/keycard/keycard.png")
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready():
|
func _ready():
|
||||||
_container = get_node("InventoryContainer")
|
_container = get_node("InventoryContainer")
|
||||||
@ -19,9 +22,11 @@ func add_item (name):
|
|||||||
#TODO: global member for inventory?
|
#TODO: global member for inventory?
|
||||||
var text
|
var text
|
||||||
if name == "Key":
|
if name == "Key":
|
||||||
text = load("res://Models/key/key.png")
|
text = _keyTexture
|
||||||
elif name == "Keycard":
|
elif name == "Keycard":
|
||||||
text = load("res://Models/keycard/keycard.png")
|
text = _cardTexture
|
||||||
|
else:
|
||||||
|
return
|
||||||
|
|
||||||
var rect = TextureRect.new()
|
var rect = TextureRect.new()
|
||||||
rect.texture = text
|
rect.texture = text
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
[ext_resource path="res://Characters/Player/UI/UI.gd" type="Script" id=1]
|
[ext_resource path="res://Characters/Player/UI/UI.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://Resources/Textures/pillLevel_fill.png" type="Texture" id=2]
|
[ext_resource path="res://Resources/Textures/pillLevel_fill.png" type="Texture" id=2]
|
||||||
|
|
||||||
|
|
||||||
[node name="HUD" type="Control"]
|
[node name="HUD" type="Control"]
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
@ -12,6 +11,7 @@ margin_right = 10.2837
|
|||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
[node name="PressInteract" type="Label" parent="."]
|
[node name="PressInteract" type="Label" parent="."]
|
||||||
|
visible = false
|
||||||
margin_left = 453.005
|
margin_left = 453.005
|
||||||
margin_top = 515.582
|
margin_top = 515.582
|
||||||
margin_right = 569.005
|
margin_right = 569.005
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
[gd_scene load_steps=5 format=2]
|
[gd_scene load_steps=5 format=2]
|
||||||
|
|
||||||
[sub_resource type="SpatialMaterial" id=4]
|
[sub_resource type="SpatialMaterial" id=1]
|
||||||
albedo_color = Color( 0.807843, 1, 0.698039, 1 )
|
albedo_color = Color( 0.807843, 1, 0.698039, 1 )
|
||||||
|
|
||||||
[sub_resource type="CubeMesh" id=1]
|
[sub_resource type="CubeMesh" id=2]
|
||||||
material = SubResource( 4 )
|
material = SubResource( 1 )
|
||||||
size = Vector3( 26, 12, 14 )
|
size = Vector3( 26, 12, 14 )
|
||||||
|
|
||||||
[sub_resource type="CubeMesh" id=2]
|
[sub_resource type="CubeMesh" id=3]
|
||||||
size = Vector3( 24, 14, 12 )
|
size = Vector3( 24, 14, 12 )
|
||||||
|
|
||||||
[sub_resource type="CapsuleMesh" id=3]
|
[sub_resource type="CapsuleMesh" id=4]
|
||||||
radius = 2.0
|
radius = 2.0
|
||||||
mid_height = 2.0
|
mid_height = 2.0
|
||||||
|
|
||||||
@ -18,14 +18,14 @@ mid_height = 2.0
|
|||||||
|
|
||||||
[node name="CSGMesh" type="CSGMesh" parent="."]
|
[node name="CSGMesh" type="CSGMesh" 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( 2 )
|
||||||
|
|
||||||
[node name="CSGMesh2" type="CSGMesh" parent="CSGMesh"]
|
[node name="CSGMesh2" type="CSGMesh" parent="CSGMesh"]
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00447488, -1, -0.00174999 )
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00447488, -1, -0.00174999 )
|
||||||
operation = 2
|
operation = 2
|
||||||
mesh = SubResource( 2 )
|
mesh = SubResource( 3 )
|
||||||
|
|
||||||
[node name="CSGMesh3" type="CSGMesh" parent="CSGMesh"]
|
[node name="CSGMesh3" type="CSGMesh" parent="CSGMesh"]
|
||||||
transform = Transform( 1, 0, 0, 0, -0.0161161, -0.99987, 0, 0.99987, -0.0161161, 0, -4.59426, -5.98218 )
|
transform = Transform( 1, 0, 0, 0, -0.0161161, -0.99987, 0, 0.99987, -0.0161161, 0, -4.59426, -5.98218 )
|
||||||
operation = 2
|
operation = 2
|
||||||
mesh = SubResource( 3 )
|
mesh = SubResource( 4 )
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
extends KinematicBody
|
extends KinematicBody
|
||||||
|
|
||||||
# export variables
|
# export variables
|
||||||
export(NodePath) var outline_path
|
|
||||||
export(bool) var card_door
|
export(bool) var card_door
|
||||||
export(int) var door_lvl
|
export(int) var door_lvl
|
||||||
|
|
||||||
|
var outline: MeshInstance
|
||||||
|
|
||||||
# const
|
# const
|
||||||
const OPENING_SPEED = 50
|
const OPENING_SPEED = 50
|
||||||
|
|
||||||
# private members
|
# private members
|
||||||
var _startingRotY : int
|
var _startingRotY : float
|
||||||
var _isMoving = false
|
var _isMoving = false
|
||||||
var _isOpening = false
|
var _isOpening = false
|
||||||
var _degrees = 0
|
var _degrees = 0
|
||||||
@ -17,11 +18,13 @@ var _degrees = 0
|
|||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready():
|
func _ready():
|
||||||
_startingRotY = global_transform.basis.get_euler().y
|
_startingRotY = global_transform.basis.get_euler().y
|
||||||
|
outline = get_node("DoorMesh/Outline") as MeshInstance
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
if _isMoving:
|
if _isMoving:
|
||||||
door_move(delta)
|
_door_move(delta)
|
||||||
|
|
||||||
|
|
||||||
# called by player to interact with this scene
|
# called by player to interact with this scene
|
||||||
func do_interact(var player):
|
func do_interact(var player):
|
||||||
@ -37,8 +40,9 @@ func do_interact(var player):
|
|||||||
else:
|
else:
|
||||||
print("you don't have the right key")
|
print("you don't have the right key")
|
||||||
|
|
||||||
|
|
||||||
# opens or closes the door
|
# opens or closes the door
|
||||||
func door_move(delta):
|
func _door_move(delta):
|
||||||
if _isOpening:
|
if _isOpening:
|
||||||
if _degrees < 100:
|
if _degrees < 100:
|
||||||
_degrees += OPENING_SPEED * delta
|
_degrees += OPENING_SPEED * delta
|
||||||
@ -51,4 +55,5 @@ func door_move(delta):
|
|||||||
else:
|
else:
|
||||||
_degrees = 0
|
_degrees = 0
|
||||||
_isMoving = false
|
_isMoving = false
|
||||||
|
|
||||||
rotate_y(_degrees * PI/180 - global_transform.basis.get_euler().y + _startingRotY)
|
rotate_y(_degrees * PI/180 - global_transform.basis.get_euler().y + _startingRotY)
|
||||||
|
@ -3,9 +3,6 @@
|
|||||||
[ext_resource path="res://Level/Interactables/Door/Door.gd" type="Script" id=1]
|
[ext_resource path="res://Level/Interactables/Door/Door.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://Materials/Glow.tres" type="Material" id=2]
|
[ext_resource path="res://Materials/Glow.tres" type="Material" id=2]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[sub_resource type="CubeMesh" id=1]
|
[sub_resource type="CubeMesh" id=1]
|
||||||
|
|
||||||
[sub_resource type="ArrayMesh" id=2]
|
[sub_resource type="ArrayMesh" id=2]
|
||||||
@ -28,9 +25,7 @@ surfaces/0 = {
|
|||||||
[node name="Door" type="KinematicBody" groups=[
|
[node name="Door" type="KinematicBody" groups=[
|
||||||
"Touchables",
|
"Touchables",
|
||||||
]]
|
]]
|
||||||
editor/display_folded = true
|
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
outline_path = NodePath("DoorMesh/Outline")
|
|
||||||
|
|
||||||
[node name="DoorMesh" type="MeshInstance" parent="."]
|
[node name="DoorMesh" type="MeshInstance" parent="."]
|
||||||
transform = Transform( 1, 0, 0, 0, 2, 0, 0, 0, 0.1, 1, 0, 0 )
|
transform = Transform( 1, 0, 0, 0, 2, 0, 0, 0, 0.1, 1, 0, 0 )
|
||||||
|
@ -1,24 +1,17 @@
|
|||||||
extends StaticBody
|
extends StaticBody
|
||||||
|
|
||||||
# Declare member variables here. Examples:
|
|
||||||
# var a = 2
|
|
||||||
# var b = "text"
|
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
|
||||||
func _ready():
|
func _ready():
|
||||||
var forks = get_tree().get_nodes_in_group("PipeForks")
|
var forks = get_tree().get_nodes_in_group("PipeForks")
|
||||||
for f in forks:
|
for f in forks:
|
||||||
f.connect("flow_changed", self, "_update_pipe_colors")
|
f.connect("flow_changed", self, "_update_pipe_colors")
|
||||||
|
|
||||||
|
|
||||||
func _update_pipe_colors():
|
func _update_pipe_colors():
|
||||||
var pipes = get_tree().get_nodes_in_group("Pipes")
|
var pipes = get_tree().get_nodes_in_group("Pipes")
|
||||||
for p in pipes:
|
for p in pipes:
|
||||||
p.update_content_color()
|
p.update_content_color()
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
#func _process(delta):
|
|
||||||
# pass
|
|
||||||
|
|
||||||
|
|
||||||
func _on_Fork1_flow_changed():
|
func _on_Fork1_flow_changed():
|
||||||
pass # Replace with function body.
|
pass # Replace with function body.
|
||||||
|
@ -1,17 +1,11 @@
|
|||||||
extends StaticBody
|
extends StaticBody
|
||||||
|
|
||||||
# export variables
|
|
||||||
export(NodePath) var outline_path
|
|
||||||
export(int) var key_id
|
export(int) var key_id
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
onready var outline = get_node("KeyMesh/Outline") as MeshInstance
|
||||||
func _ready():
|
|
||||||
pass # Replace with function body.
|
|
||||||
|
|
||||||
func do_interact(var player):
|
func do_interact(var player):
|
||||||
|
# TODO: move to global inventory
|
||||||
player.key_chain.append(key_id)
|
player.key_chain.append(key_id)
|
||||||
queue_free()
|
queue_free()
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
func _process(delta):
|
|
||||||
pass
|
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,18 +1,12 @@
|
|||||||
extends StaticBody
|
extends StaticBody
|
||||||
|
|
||||||
# export variables
|
|
||||||
export(NodePath) var outline_path
|
|
||||||
export(int) var card_lvl
|
export(int) var card_lvl
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
onready var outline = get_node("KeycardMesh/Outline") as MeshInstance
|
||||||
func _ready():
|
|
||||||
pass # Replace with function body.
|
|
||||||
|
|
||||||
func do_interact(var player):
|
func do_interact(var player):
|
||||||
|
# TODO: move to global inventory
|
||||||
if card_lvl > player.keycard_lvl:
|
if card_lvl > player.keycard_lvl:
|
||||||
player.keycard_lvl = card_lvl
|
player.keycard_lvl = card_lvl
|
||||||
queue_free()
|
queue_free()
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
func _process(delta):
|
|
||||||
pass
|
|
@ -6,12 +6,10 @@
|
|||||||
[ext_resource path="res://Materials/Glow.tres" type="Material" id=4]
|
[ext_resource path="res://Materials/Glow.tres" type="Material" id=4]
|
||||||
[ext_resource path="res://Resources/Models/keycard/keycard.dae" type="PackedScene" id=5]
|
[ext_resource path="res://Resources/Models/keycard/keycard.dae" type="PackedScene" id=5]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[sub_resource type="ArrayMesh" id=1]
|
[sub_resource type="ArrayMesh" id=1]
|
||||||
resource_name = "Cube"
|
resource_name = "Cube"
|
||||||
surfaces/0 = {
|
surfaces/0 = {
|
||||||
"aabb": AABB( 1, -1, -1, 1.00136e-05, 2, 2.00001 ),
|
"aabb": AABB( 1, -1, -1, 1.00136e-005, 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_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 ),
|
"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": [ ],
|
"blend_shape_data": [ ],
|
||||||
@ -56,15 +54,14 @@ surfaces/0 = {
|
|||||||
"Touchables",
|
"Touchables",
|
||||||
]]
|
]]
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
outline_path = NodePath("KeycardModel/Outline")
|
|
||||||
|
|
||||||
[node name="KeycardModel" type="MeshInstance" parent="."]
|
[node name="KeycardMesh" type="MeshInstance" parent="."]
|
||||||
transform = Transform( 0.003, 0, 0, 0, 0.06, 0, 0, 0, 0.1, 0, 0, 0 )
|
transform = Transform( 0.003, 0, 0, 0, 0.06, 0, 0, 0, 0.1, 0, 0, 0 )
|
||||||
mesh = SubResource( 1 )
|
mesh = SubResource( 1 )
|
||||||
material/0 = null
|
material/0 = null
|
||||||
material/1 = null
|
material/1 = null
|
||||||
|
|
||||||
[node name="Outline" type="MeshInstance" parent="KeycardModel"]
|
[node name="Outline" type="MeshInstance" parent="KeycardMesh"]
|
||||||
visible = false
|
visible = false
|
||||||
mesh = SubResource( 2 )
|
mesh = SubResource( 2 )
|
||||||
material/0 = ExtResource( 4 )
|
material/0 = ExtResource( 4 )
|
||||||
|
@ -1,25 +1,11 @@
|
|||||||
extends StaticBody
|
extends StaticBody
|
||||||
|
|
||||||
# export variables
|
onready var leverMesh = get_node("LeverMesh")
|
||||||
export(NodePath) var outline_path
|
onready var outline = get_node("LeverMesh/Outline") as MeshInstance
|
||||||
export(NodePath) var levermesh_path
|
|
||||||
|
var IsOn = false
|
||||||
|
|
||||||
# private members
|
|
||||||
var _isOn = false
|
|
||||||
# var b = "text"
|
|
||||||
|
|
||||||
func do_interact(var player):
|
func do_interact(var player):
|
||||||
if(_isOn):
|
set_scale(Vector3(1, 1 if IsOn else -1, 1))
|
||||||
get_node(levermesh_path).rotate_x(-PI/2)
|
IsOn = !IsOn
|
||||||
_isOn = false
|
|
||||||
else:
|
|
||||||
get_node(levermesh_path).rotate_x(PI/2)
|
|
||||||
_isOn = true
|
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
|
||||||
func _ready():
|
|
||||||
pass # Replace with function body.
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
#func _process(delta):
|
|
||||||
# pass
|
|
||||||
|
@ -3,9 +3,6 @@
|
|||||||
[ext_resource path="res://Level/Interactables/Lever/Lever.gd" type="Script" id=1]
|
[ext_resource path="res://Level/Interactables/Lever/Lever.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://Materials/Glow.tres" type="Material" id=2]
|
[ext_resource path="res://Materials/Glow.tres" type="Material" id=2]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[sub_resource type="CubeMesh" id=1]
|
[sub_resource type="CubeMesh" id=1]
|
||||||
|
|
||||||
[sub_resource type="CubeMesh" id=2]
|
[sub_resource type="CubeMesh" id=2]
|
||||||
@ -29,8 +26,6 @@ surfaces/0 = {
|
|||||||
"Touchables",
|
"Touchables",
|
||||||
]]
|
]]
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
outline_path = NodePath("LeverMesh/Outline")
|
|
||||||
levermesh_path = NodePath("LeverMesh")
|
|
||||||
|
|
||||||
[node name="BoxMesh" type="MeshInstance" parent="."]
|
[node name="BoxMesh" type="MeshInstance" parent="."]
|
||||||
transform = Transform( 0.1, 0, 0, 0, 0.2, 0, 0, 0, 0.05, 0, 0, 0 )
|
transform = Transform( 0.1, 0, 0, 0, 0.2, 0, 0, 0, 0.05, 0, 0, 0 )
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
[gd_scene load_steps=21 format=2]
|
[gd_scene load_steps=20 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://Resources/Models/pill/blue.material" type="Material" id=1]
|
[ext_resource path="res://Resources/Models/pill/blue.material" type="Material" id=1]
|
||||||
[ext_resource path="res://Resources/Models/pill/other.material" type="Material" id=2]
|
[ext_resource path="res://Resources/Models/pill/other.material" type="Material" id=2]
|
||||||
[ext_resource path="res://Resources/Models/pill/pill101blend.glb" type="PackedScene" id=3]
|
[ext_resource path="res://Resources/Models/sandwich(lecker)/breadBrown.material" type="Material" id=3]
|
||||||
[ext_resource path="res://Resources/Models/sandwich(lecker)/breadBrown.material" type="Material" id=4]
|
[ext_resource path="res://Resources/Models/sandwich(lecker)/tomatoRed.material" type="Material" id=4]
|
||||||
[ext_resource path="res://Resources/Models/sandwich(lecker)/tomatoRed.material" type="Material" id=5]
|
[ext_resource path="res://Resources/Models/sandwich(lecker)/Cheese.material" type="Material" id=5]
|
||||||
[ext_resource path="res://Resources/Models/sandwich(lecker)/Cheese.material" type="Material" id=6]
|
[ext_resource path="res://Resources/Models/sandwich(lecker)/HAM.material" type="Material" id=6]
|
||||||
[ext_resource path="res://Resources/Models/sandwich(lecker)/HAM.material" type="Material" id=7]
|
[ext_resource path="res://Resources/Models/sandwich(lecker)/Lettuce.material" type="Material" id=7]
|
||||||
[ext_resource path="res://Resources/Models/sandwich(lecker)/Lettuce.material" type="Material" id=8]
|
|
||||||
|
|
||||||
[sub_resource type="ArrayMesh" id=1]
|
[sub_resource type="ArrayMesh" id=1]
|
||||||
resource_name = "Sphere"
|
resource_name = "Sphere"
|
||||||
@ -44,7 +43,7 @@ surfaces/0 = {
|
|||||||
"blend_shape_data": [ ],
|
"blend_shape_data": [ ],
|
||||||
"format": 97567,
|
"format": 97567,
|
||||||
"index_count": 36,
|
"index_count": 36,
|
||||||
"material": ExtResource( 4 ),
|
"material": ExtResource( 3 ),
|
||||||
"primitive": 4,
|
"primitive": 4,
|
||||||
"skeleton_aabb": [ ],
|
"skeleton_aabb": [ ],
|
||||||
"vertex_count": 24
|
"vertex_count": 24
|
||||||
@ -58,7 +57,7 @@ surfaces/0 = {
|
|||||||
"blend_shape_data": [ ],
|
"blend_shape_data": [ ],
|
||||||
"format": 97559,
|
"format": 97559,
|
||||||
"index_count": 36,
|
"index_count": 36,
|
||||||
"material": ExtResource( 4 ),
|
"material": ExtResource( 3 ),
|
||||||
"primitive": 4,
|
"primitive": 4,
|
||||||
"skeleton_aabb": [ ],
|
"skeleton_aabb": [ ],
|
||||||
"vertex_count": 24
|
"vertex_count": 24
|
||||||
@ -72,7 +71,7 @@ surfaces/0 = {
|
|||||||
"blend_shape_data": [ ],
|
"blend_shape_data": [ ],
|
||||||
"format": 97559,
|
"format": 97559,
|
||||||
"index_count": 120,
|
"index_count": 120,
|
||||||
"material": ExtResource( 5 ),
|
"material": ExtResource( 4 ),
|
||||||
"primitive": 4,
|
"primitive": 4,
|
||||||
"skeleton_aabb": [ ],
|
"skeleton_aabb": [ ],
|
||||||
"vertex_count": 66
|
"vertex_count": 66
|
||||||
@ -86,7 +85,7 @@ surfaces/0 = {
|
|||||||
"blend_shape_data": [ ],
|
"blend_shape_data": [ ],
|
||||||
"format": 97559,
|
"format": 97559,
|
||||||
"index_count": 120,
|
"index_count": 120,
|
||||||
"material": ExtResource( 5 ),
|
"material": ExtResource( 4 ),
|
||||||
"primitive": 4,
|
"primitive": 4,
|
||||||
"skeleton_aabb": [ ],
|
"skeleton_aabb": [ ],
|
||||||
"vertex_count": 66
|
"vertex_count": 66
|
||||||
@ -100,7 +99,7 @@ surfaces/0 = {
|
|||||||
"blend_shape_data": [ ],
|
"blend_shape_data": [ ],
|
||||||
"format": 97559,
|
"format": 97559,
|
||||||
"index_count": 120,
|
"index_count": 120,
|
||||||
"material": ExtResource( 5 ),
|
"material": ExtResource( 4 ),
|
||||||
"primitive": 4,
|
"primitive": 4,
|
||||||
"skeleton_aabb": [ ],
|
"skeleton_aabb": [ ],
|
||||||
"vertex_count": 66
|
"vertex_count": 66
|
||||||
@ -114,7 +113,7 @@ surfaces/0 = {
|
|||||||
"blend_shape_data": [ ],
|
"blend_shape_data": [ ],
|
||||||
"format": 97559,
|
"format": 97559,
|
||||||
"index_count": 141,
|
"index_count": 141,
|
||||||
"material": ExtResource( 6 ),
|
"material": ExtResource( 5 ),
|
||||||
"primitive": 4,
|
"primitive": 4,
|
||||||
"skeleton_aabb": [ ],
|
"skeleton_aabb": [ ],
|
||||||
"vertex_count": 89
|
"vertex_count": 89
|
||||||
@ -128,7 +127,7 @@ surfaces/0 = {
|
|||||||
"blend_shape_data": [ ],
|
"blend_shape_data": [ ],
|
||||||
"format": 97559,
|
"format": 97559,
|
||||||
"index_count": 96,
|
"index_count": 96,
|
||||||
"material": ExtResource( 7 ),
|
"material": ExtResource( 6 ),
|
||||||
"primitive": 4,
|
"primitive": 4,
|
||||||
"skeleton_aabb": [ ],
|
"skeleton_aabb": [ ],
|
||||||
"vertex_count": 54
|
"vertex_count": 54
|
||||||
@ -142,7 +141,7 @@ surfaces/0 = {
|
|||||||
"blend_shape_data": [ ],
|
"blend_shape_data": [ ],
|
||||||
"format": 97559,
|
"format": 97559,
|
||||||
"index_count": 117,
|
"index_count": 117,
|
||||||
"material": ExtResource( 6 ),
|
"material": ExtResource( 5 ),
|
||||||
"primitive": 4,
|
"primitive": 4,
|
||||||
"skeleton_aabb": [ ],
|
"skeleton_aabb": [ ],
|
||||||
"vertex_count": 73
|
"vertex_count": 73
|
||||||
@ -156,7 +155,7 @@ surfaces/0 = {
|
|||||||
"blend_shape_data": [ ],
|
"blend_shape_data": [ ],
|
||||||
"format": 97559,
|
"format": 97559,
|
||||||
"index_count": 36,
|
"index_count": 36,
|
||||||
"material": ExtResource( 6 ),
|
"material": ExtResource( 5 ),
|
||||||
"primitive": 4,
|
"primitive": 4,
|
||||||
"skeleton_aabb": [ ],
|
"skeleton_aabb": [ ],
|
||||||
"vertex_count": 24
|
"vertex_count": 24
|
||||||
@ -170,7 +169,7 @@ surfaces/0 = {
|
|||||||
"blend_shape_data": [ ],
|
"blend_shape_data": [ ],
|
||||||
"format": 97559,
|
"format": 97559,
|
||||||
"index_count": 54,
|
"index_count": 54,
|
||||||
"material": ExtResource( 8 ),
|
"material": ExtResource( 7 ),
|
||||||
"primitive": 4,
|
"primitive": 4,
|
||||||
"skeleton_aabb": [ ],
|
"skeleton_aabb": [ ],
|
||||||
"vertex_count": 38
|
"vertex_count": 38
|
||||||
@ -184,7 +183,7 @@ surfaces/0 = {
|
|||||||
"blend_shape_data": [ ],
|
"blend_shape_data": [ ],
|
||||||
"format": 97559,
|
"format": 97559,
|
||||||
"index_count": 54,
|
"index_count": 54,
|
||||||
"material": ExtResource( 8 ),
|
"material": ExtResource( 7 ),
|
||||||
"primitive": 4,
|
"primitive": 4,
|
||||||
"skeleton_aabb": [ ],
|
"skeleton_aabb": [ ],
|
||||||
"vertex_count": 38
|
"vertex_count": 38
|
||||||
@ -198,23 +197,13 @@ mesh = SubResource( 1 )
|
|||||||
material/0 = null
|
material/0 = null
|
||||||
material/1 = null
|
material/1 = null
|
||||||
|
|
||||||
[node name="TrueFormImport" parent="." instance=ExtResource( 3 )]
|
|
||||||
visible = false
|
|
||||||
|
|
||||||
[node name="MaskedFormImport" type="Spatial" parent="."]
|
[node name="MaskedFormImport" type="Spatial" parent="."]
|
||||||
editor/display_folded = true
|
|
||||||
|
|
||||||
[node name="UpperBread" type="MeshInstance" parent="MaskedFormImport"]
|
[node name="UpperBread" type="MeshInstance" parent="MaskedFormImport"]
|
||||||
transform = Transform( 1, 0, 0, 0, 0.08, 0, 0, 0, 1, 0, 0.5, 0.0182276 )
|
transform = Transform( 1, 0, 0, 0, 0.08, 0, 0, 0, 1, 0, 0.5, 0.0182276 )
|
||||||
mesh = SubResource( 2 )
|
mesh = SubResource( 2 )
|
||||||
material/0 = null
|
material/0 = null
|
||||||
|
|
||||||
[node name="Light" type="Spatial" parent="MaskedFormImport"]
|
|
||||||
transform = Transform( -0.290865, 0.566393, 0.771101, -0.0551891, 0.794672, -0.604525, -0.955171, -0.218391, -0.199883, 4.07625, 5.90386, -1.00545 )
|
|
||||||
|
|
||||||
[node name="Camera" type="Spatial" parent="MaskedFormImport"]
|
|
||||||
transform = Transform( 0.685921, 0.651558, 0.324014, 0, 0.445271, -0.895396, -0.727676, 0.61417, 0.305421, 7.35889, 4.95831, 6.92579 )
|
|
||||||
|
|
||||||
[node name="LowerBread" type="MeshInstance" parent="MaskedFormImport"]
|
[node name="LowerBread" type="MeshInstance" parent="MaskedFormImport"]
|
||||||
transform = Transform( 1, 0, 0, 0, 0.08, 0, 0, 0, 1, 0, -0.057435, 0 )
|
transform = Transform( 1, 0, 0, 0, 0.08, 0, 0, 0, 1, 0, -0.057435, 0 )
|
||||||
mesh = SubResource( 3 )
|
mesh = SubResource( 3 )
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
[ext_resource path="res://Resources/Models/eckiPipe/Material.material" type="Material" id=2]
|
[ext_resource path="res://Resources/Models/eckiPipe/Material.material" type="Material" id=2]
|
||||||
[ext_resource path="res://Materials/Glow.tres" type="Material" id=3]
|
[ext_resource path="res://Materials/Glow.tres" type="Material" id=3]
|
||||||
|
|
||||||
[sub_resource type="ArrayMesh" id=10]
|
[sub_resource type="ArrayMesh" id=1]
|
||||||
resource_name = "Cube"
|
resource_name = "Cube"
|
||||||
surfaces/0 = {
|
surfaces/0 = {
|
||||||
"aabb": AABB( -0.5, -0.5, -1, 1.00001, 1.5, 1.5 ),
|
"aabb": AABB( -0.5, -0.5, -1, 1.00001, 1.5, 1.5 ),
|
||||||
@ -20,7 +20,7 @@ surfaces/0 = {
|
|||||||
"vertex_count": 36
|
"vertex_count": 36
|
||||||
}
|
}
|
||||||
|
|
||||||
[sub_resource type="ArrayMesh" id=11]
|
[sub_resource type="ArrayMesh" id=2]
|
||||||
surfaces/0 = {
|
surfaces/0 = {
|
||||||
"aabb": AABB( -0.557735, -0.557735, -1.05773, 1.11548, 1.61547, 1.61547 ),
|
"aabb": AABB( -0.557735, -0.557735, -1.05773, 1.11548, 1.61547, 1.61547 ),
|
||||||
"array_data": PoolByteArray( 185, 199, 14, 63, 185, 199, 14, 63, 185, 199, 14, 191, 0, 127, 0, 0, 129, 0, 0, 127, 0, 54, 0, 54, 185, 199, 14, 191, 185, 199, 14, 63, 220, 99, 135, 191, 0, 127, 0, 0, 129, 0, 0, 127, 0, 59, 0, 56, 185, 199, 14, 191, 185, 199, 14, 63, 185, 199, 14, 191, 0, 127, 0, 0, 149, 0, 189, 129, 0, 0, 0, 60, 185, 199, 14, 63, 220, 99, 135, 63, 185, 199, 14, 191, 0, 127, 0, 0, 0, 0, 129, 127, 0, 57, 0, 58, 185, 199, 14, 191, 220, 99, 135, 63, 185, 199, 14, 63, 0, 127, 0, 0, 0, 0, 129, 127, 0, 54, 0, 56, 185, 199, 14, 63, 220, 99, 135, 63, 185, 199, 14, 63, 0, 127, 0, 0, 0, 0, 129, 127, 0, 54, 0, 58, 185, 199, 14, 63, 220, 99, 135, 63, 185, 199, 14, 191, 0, 0, 129, 0, 47, 139, 0, 129, 0, 54, 0, 52, 185, 199, 14, 191, 185, 199, 14, 63, 185, 199, 14, 191, 0, 0, 129, 0, 47, 139, 0, 129, 0, 0, 0, 60, 185, 199, 14, 191, 220, 99, 135, 63, 185, 199, 14, 191, 0, 0, 129, 0, 133, 30, 0, 127, 0, 57, 0, 56, 185, 199, 14, 63, 185, 199, 14, 191, 185, 199, 14, 63, 0, 0, 127, 0, 127, 0, 0, 127, 0, 57, 0, 48, 185, 199, 14, 191, 220, 99, 135, 63, 185, 199, 14, 63, 0, 0, 127, 0, 127, 0, 0, 127, 0, 54, 0, 0, 185, 199, 14, 191, 185, 199, 14, 191, 185, 199, 14, 63, 0, 0, 127, 0, 127, 0, 0, 127, 0, 54, 0, 48, 185, 199, 14, 63, 185, 199, 14, 63, 185, 199, 14, 191, 127, 0, 0, 0, 0, 89, 167, 127, 0, 54, 0, 54, 185, 199, 14, 63, 220, 99, 135, 63, 185, 199, 14, 63, 127, 0, 0, 0, 0, 67, 149, 127, 0, 48, 0, 52, 185, 199, 14, 63, 185, 199, 14, 191, 185, 199, 14, 63, 127, 0, 0, 0, 0, 89, 167, 127, 0, 48, 0, 54, 185, 199, 14, 191, 185, 199, 14, 63, 220, 99, 135, 191, 0, 0, 129, 0, 0, 127, 0, 127, 0, 59, 0, 56, 185, 199, 14, 63, 185, 199, 14, 191, 220, 99, 135, 191, 0, 0, 129, 0, 0, 127, 0, 127, 0, 57, 0, 52, 185, 199, 14, 191, 185, 199, 14, 191, 220, 99, 135, 191, 0, 0, 129, 0, 0, 127, 0, 127, 0, 57, 0, 56, 185, 199, 14, 191, 185, 199, 14, 63, 185, 199, 14, 191, 129, 0, 0, 0, 0, 111, 195, 129, 0, 0, 0, 60, 185, 199, 14, 191, 185, 199, 14, 63, 220, 99, 135, 191, 129, 0, 0, 0, 0, 123, 226, 127, 0, 59, 0, 56, 185, 199, 14, 191, 185, 199, 14, 191, 220, 99, 135, 191, 129, 0, 0, 0, 0, 33, 134, 127, 0, 54, 0, 52, 185, 199, 14, 63, 185, 199, 14, 63, 220, 99, 135, 191, 0, 127, 0, 0, 129, 0, 0, 127, 0, 54, 0, 56, 185, 199, 14, 191, 220, 99, 135, 63, 185, 199, 14, 191, 0, 127, 0, 0, 0, 0, 129, 127, 0, 57, 0, 56, 185, 199, 14, 63, 185, 199, 14, 63, 185, 199, 14, 191, 0, 0, 129, 0, 47, 139, 0, 129, 0, 54, 0, 54, 185, 199, 14, 191, 185, 199, 14, 191, 185, 199, 14, 63, 0, 129, 0, 0, 127, 0, 0, 127, 0, 54, 0, 48, 185, 199, 14, 191, 185, 199, 14, 191, 220, 99, 135, 191, 0, 129, 0, 0, 127, 0, 0, 127, 0, 54, 0, 52, 185, 199, 14, 63, 185, 199, 14, 191, 220, 99, 135, 191, 0, 129, 0, 0, 127, 0, 0, 127, 0, 57, 0, 52, 185, 199, 14, 63, 220, 99, 135, 63, 185, 199, 14, 63, 0, 0, 127, 0, 127, 0, 0, 127, 0, 57, 0, 0, 185, 199, 14, 63, 185, 199, 14, 191, 185, 199, 14, 63, 0, 129, 0, 0, 127, 0, 0, 127, 0, 57, 0, 48, 185, 199, 14, 63, 185, 199, 14, 191, 220, 99, 135, 191, 127, 0, 0, 0, 0, 107, 189, 127, 0, 48, 0, 56, 185, 199, 14, 63, 185, 199, 14, 63, 220, 99, 135, 191, 127, 0, 0, 0, 0, 127, 0, 127, 0, 54, 0, 56, 185, 199, 14, 63, 220, 99, 135, 63, 185, 199, 14, 191, 127, 0, 0, 0, 0, 0, 129, 127, 0, 54, 0, 52, 185, 199, 14, 63, 185, 199, 14, 63, 220, 99, 135, 191, 0, 0, 129, 0, 0, 127, 0, 127, 0, 59, 0, 52, 185, 199, 14, 191, 185, 199, 14, 191, 185, 199, 14, 63, 129, 0, 0, 0, 0, 117, 47, 129, 0, 54, 0, 48, 185, 199, 14, 191, 220, 99, 135, 63, 185, 199, 14, 63, 129, 0, 0, 0, 0, 126, 250, 129, 0, 54, 0, 56, 185, 199, 14, 191, 220, 99, 135, 63, 185, 199, 14, 191, 129, 0, 0, 0, 0, 0, 129, 129, 0, 57, 0, 56 ),
|
"array_data": PoolByteArray( 185, 199, 14, 63, 185, 199, 14, 63, 185, 199, 14, 191, 0, 127, 0, 0, 129, 0, 0, 127, 0, 54, 0, 54, 185, 199, 14, 191, 185, 199, 14, 63, 220, 99, 135, 191, 0, 127, 0, 0, 129, 0, 0, 127, 0, 59, 0, 56, 185, 199, 14, 191, 185, 199, 14, 63, 185, 199, 14, 191, 0, 127, 0, 0, 149, 0, 189, 129, 0, 0, 0, 60, 185, 199, 14, 63, 220, 99, 135, 63, 185, 199, 14, 191, 0, 127, 0, 0, 0, 0, 129, 127, 0, 57, 0, 58, 185, 199, 14, 191, 220, 99, 135, 63, 185, 199, 14, 63, 0, 127, 0, 0, 0, 0, 129, 127, 0, 54, 0, 56, 185, 199, 14, 63, 220, 99, 135, 63, 185, 199, 14, 63, 0, 127, 0, 0, 0, 0, 129, 127, 0, 54, 0, 58, 185, 199, 14, 63, 220, 99, 135, 63, 185, 199, 14, 191, 0, 0, 129, 0, 47, 139, 0, 129, 0, 54, 0, 52, 185, 199, 14, 191, 185, 199, 14, 63, 185, 199, 14, 191, 0, 0, 129, 0, 47, 139, 0, 129, 0, 0, 0, 60, 185, 199, 14, 191, 220, 99, 135, 63, 185, 199, 14, 191, 0, 0, 129, 0, 133, 30, 0, 127, 0, 57, 0, 56, 185, 199, 14, 63, 185, 199, 14, 191, 185, 199, 14, 63, 0, 0, 127, 0, 127, 0, 0, 127, 0, 57, 0, 48, 185, 199, 14, 191, 220, 99, 135, 63, 185, 199, 14, 63, 0, 0, 127, 0, 127, 0, 0, 127, 0, 54, 0, 0, 185, 199, 14, 191, 185, 199, 14, 191, 185, 199, 14, 63, 0, 0, 127, 0, 127, 0, 0, 127, 0, 54, 0, 48, 185, 199, 14, 63, 185, 199, 14, 63, 185, 199, 14, 191, 127, 0, 0, 0, 0, 89, 167, 127, 0, 54, 0, 54, 185, 199, 14, 63, 220, 99, 135, 63, 185, 199, 14, 63, 127, 0, 0, 0, 0, 67, 149, 127, 0, 48, 0, 52, 185, 199, 14, 63, 185, 199, 14, 191, 185, 199, 14, 63, 127, 0, 0, 0, 0, 89, 167, 127, 0, 48, 0, 54, 185, 199, 14, 191, 185, 199, 14, 63, 220, 99, 135, 191, 0, 0, 129, 0, 0, 127, 0, 127, 0, 59, 0, 56, 185, 199, 14, 63, 185, 199, 14, 191, 220, 99, 135, 191, 0, 0, 129, 0, 0, 127, 0, 127, 0, 57, 0, 52, 185, 199, 14, 191, 185, 199, 14, 191, 220, 99, 135, 191, 0, 0, 129, 0, 0, 127, 0, 127, 0, 57, 0, 56, 185, 199, 14, 191, 185, 199, 14, 63, 185, 199, 14, 191, 129, 0, 0, 0, 0, 111, 195, 129, 0, 0, 0, 60, 185, 199, 14, 191, 185, 199, 14, 63, 220, 99, 135, 191, 129, 0, 0, 0, 0, 123, 226, 127, 0, 59, 0, 56, 185, 199, 14, 191, 185, 199, 14, 191, 220, 99, 135, 191, 129, 0, 0, 0, 0, 33, 134, 127, 0, 54, 0, 52, 185, 199, 14, 63, 185, 199, 14, 63, 220, 99, 135, 191, 0, 127, 0, 0, 129, 0, 0, 127, 0, 54, 0, 56, 185, 199, 14, 191, 220, 99, 135, 63, 185, 199, 14, 191, 0, 127, 0, 0, 0, 0, 129, 127, 0, 57, 0, 56, 185, 199, 14, 63, 185, 199, 14, 63, 185, 199, 14, 191, 0, 0, 129, 0, 47, 139, 0, 129, 0, 54, 0, 54, 185, 199, 14, 191, 185, 199, 14, 191, 185, 199, 14, 63, 0, 129, 0, 0, 127, 0, 0, 127, 0, 54, 0, 48, 185, 199, 14, 191, 185, 199, 14, 191, 220, 99, 135, 191, 0, 129, 0, 0, 127, 0, 0, 127, 0, 54, 0, 52, 185, 199, 14, 63, 185, 199, 14, 191, 220, 99, 135, 191, 0, 129, 0, 0, 127, 0, 0, 127, 0, 57, 0, 52, 185, 199, 14, 63, 220, 99, 135, 63, 185, 199, 14, 63, 0, 0, 127, 0, 127, 0, 0, 127, 0, 57, 0, 0, 185, 199, 14, 63, 185, 199, 14, 191, 185, 199, 14, 63, 0, 129, 0, 0, 127, 0, 0, 127, 0, 57, 0, 48, 185, 199, 14, 63, 185, 199, 14, 191, 220, 99, 135, 191, 127, 0, 0, 0, 0, 107, 189, 127, 0, 48, 0, 56, 185, 199, 14, 63, 185, 199, 14, 63, 220, 99, 135, 191, 127, 0, 0, 0, 0, 127, 0, 127, 0, 54, 0, 56, 185, 199, 14, 63, 220, 99, 135, 63, 185, 199, 14, 191, 127, 0, 0, 0, 0, 0, 129, 127, 0, 54, 0, 52, 185, 199, 14, 63, 185, 199, 14, 63, 220, 99, 135, 191, 0, 0, 129, 0, 0, 127, 0, 127, 0, 59, 0, 52, 185, 199, 14, 191, 185, 199, 14, 191, 185, 199, 14, 63, 129, 0, 0, 0, 0, 117, 47, 129, 0, 54, 0, 48, 185, 199, 14, 191, 220, 99, 135, 63, 185, 199, 14, 63, 129, 0, 0, 0, 0, 126, 250, 129, 0, 54, 0, 56, 185, 199, 14, 191, 220, 99, 135, 63, 185, 199, 14, 191, 129, 0, 0, 0, 0, 0, 129, 129, 0, 57, 0, 56 ),
|
||||||
@ -33,7 +33,7 @@ surfaces/0 = {
|
|||||||
"vertex_count": 36
|
"vertex_count": 36
|
||||||
}
|
}
|
||||||
|
|
||||||
[sub_resource type="BoxShape" id=12]
|
[sub_resource type="BoxShape" id=3]
|
||||||
|
|
||||||
[node name="Spatial" type="StaticBody" groups=[
|
[node name="Spatial" type="StaticBody" groups=[
|
||||||
"Pipes",
|
"Pipes",
|
||||||
@ -41,24 +41,23 @@ surfaces/0 = {
|
|||||||
collision_layer = 7
|
collision_layer = 7
|
||||||
collision_mask = 7
|
collision_mask = 7
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
outline_path = NodePath("Mesh/Outline")
|
|
||||||
mesh_path = NodePath("Mesh")
|
mesh_path = NodePath("Mesh")
|
||||||
color_cast_left = NodePath("ColorCast")
|
color_cast_left = NodePath("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 )
|
||||||
layers = 3
|
layers = 3
|
||||||
mesh = SubResource( 10 )
|
mesh = SubResource( 1 )
|
||||||
material/0 = null
|
material/0 = null
|
||||||
|
|
||||||
[node name="Outline" type="MeshInstance" parent="Mesh"]
|
[node name="Outline" type="MeshInstance" parent="Mesh"]
|
||||||
visible = false
|
visible = false
|
||||||
mesh = SubResource( 11 )
|
mesh = SubResource( 2 )
|
||||||
material/0 = ExtResource( 3 )
|
material/0 = ExtResource( 3 )
|
||||||
|
|
||||||
[node name="CollisionShape" type="CollisionShape" parent="."]
|
[node name="CollisionShape" type="CollisionShape" parent="."]
|
||||||
transform = Transform( 0.1, 0, 0, 0, 0.14, 0, 0, 0, 0.14, 0, 0.05, -0.05 )
|
transform = Transform( 0.1, 0, 0, 0, 0.14, 0, 0, 0, 0.14, 0, 0.05, -0.05 )
|
||||||
shape = SubResource( 12 )
|
shape = SubResource( 3 )
|
||||||
|
|
||||||
[node name="ColorCast" type="RayCast" parent="."]
|
[node name="ColorCast" type="RayCast" parent="."]
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.2 )
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.2 )
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
[sub_resource type="BoxShape" id=2]
|
[sub_resource type="BoxShape" id=2]
|
||||||
|
|
||||||
[node name="InputBox" type="StaticBody" groups=[
|
[node name="InputBox" type="StaticBody" groups=[
|
||||||
"Pipes",
|
|
||||||
"InputBoxes",
|
"InputBoxes",
|
||||||
|
"Pipes",
|
||||||
]]
|
]]
|
||||||
collision_layer = 7
|
collision_layer = 7
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
extends Spatial
|
extends Spatial
|
||||||
|
|
||||||
# export variables
|
# export variables
|
||||||
export(NodePath) var outline_path
|
|
||||||
export(NodePath) var mesh_path
|
export(NodePath) var mesh_path
|
||||||
export(NodePath) var color_cast_left
|
export(NodePath) var color_cast_left
|
||||||
export(NodePath) var color_cast_up
|
export(NodePath) var color_cast_up
|
||||||
@ -12,6 +11,8 @@ export(int) var y_rot
|
|||||||
export(int) var z_rot
|
export(int) var z_rot
|
||||||
export(Color) var content_color
|
export(Color) var content_color
|
||||||
|
|
||||||
|
onready var outline = get_node("Mesh/Outline") as MeshInstance
|
||||||
|
|
||||||
# signals
|
# signals
|
||||||
signal flow_changed
|
signal flow_changed
|
||||||
|
|
||||||
@ -25,12 +26,13 @@ var _left_color : Color
|
|||||||
var _up_color : Color
|
var _up_color : Color
|
||||||
var _mesh : MeshInstance
|
var _mesh : MeshInstance
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
|
||||||
func _ready():
|
func _ready():
|
||||||
_left_cast = get_node(color_cast_left) as RayCast
|
_left_cast = get_node(color_cast_left) as RayCast
|
||||||
_up_cast = get_node(color_cast_up) as RayCast
|
_up_cast = get_node(color_cast_up) as RayCast
|
||||||
_mesh = get_node(mesh_path) as MeshInstance
|
_mesh = get_node(mesh_path) as MeshInstance
|
||||||
|
|
||||||
|
|
||||||
func do_interact(var player):
|
func do_interact(var player):
|
||||||
if(is_turned):
|
if(is_turned):
|
||||||
rotate_x(x_rot * PI/180)
|
rotate_x(x_rot * PI/180)
|
||||||
@ -44,6 +46,7 @@ func do_interact(var player):
|
|||||||
is_turned = true;
|
is_turned = true;
|
||||||
emit_signal("flow_changed")
|
emit_signal("flow_changed")
|
||||||
|
|
||||||
|
|
||||||
func _get_color_from_cast(ray_cast : RayCast):
|
func _get_color_from_cast(ray_cast : RayCast):
|
||||||
if ray_cast.is_colliding():
|
if ray_cast.is_colliding():
|
||||||
if get_name() == "Pipe":
|
if get_name() == "Pipe":
|
||||||
@ -54,6 +57,7 @@ func _get_color_from_cast(ray_cast : RayCast):
|
|||||||
if new_color != null:
|
if new_color != null:
|
||||||
return new_color
|
return new_color
|
||||||
|
|
||||||
|
|
||||||
func update_content_color():
|
func update_content_color():
|
||||||
if _left_cast != null:
|
if _left_cast != null:
|
||||||
var new_color = _get_color_from_cast(_left_cast)
|
var new_color = _get_color_from_cast(_left_cast)
|
||||||
@ -85,6 +89,3 @@ func update_content_color():
|
|||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
_mesh.material_override = null
|
_mesh.material_override = null
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
#func _process(delta):
|
|
||||||
# pass
|
|
||||||
|
@ -40,7 +40,6 @@ surfaces/0 = {
|
|||||||
collision_layer = 7
|
collision_layer = 7
|
||||||
collision_mask = 7
|
collision_mask = 7
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
outline_path = NodePath("Mesh/Outline")
|
|
||||||
mesh_path = NodePath("Mesh")
|
mesh_path = NodePath("Mesh")
|
||||||
color_cast_left = NodePath("ColorCastLeft")
|
color_cast_left = NodePath("ColorCastLeft")
|
||||||
|
|
||||||
|
@ -41,7 +41,6 @@ surfaces/0 = {
|
|||||||
collision_layer = 7
|
collision_layer = 7
|
||||||
collision_mask = 7
|
collision_mask = 7
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
outline_path = NodePath("Mesh/Outline")
|
|
||||||
mesh_path = NodePath("Mesh")
|
mesh_path = NodePath("Mesh")
|
||||||
color_cast_left = NodePath("ColorCast")
|
color_cast_left = NodePath("ColorCast")
|
||||||
|
|
||||||
|
@ -41,7 +41,6 @@ transform = Transform( 0.766044, -0.582564, 0.271654, 0, 0.422618, 0.906308, -0.
|
|||||||
light_energy = 0.19
|
light_energy = 0.19
|
||||||
|
|
||||||
[node name="NavigationMeshInstance" type="NavigationMeshInstance" parent="."]
|
[node name="NavigationMeshInstance" type="NavigationMeshInstance" parent="."]
|
||||||
editor/display_folded = true
|
|
||||||
navmesh = SubResource( 1 )
|
navmesh = SubResource( 1 )
|
||||||
|
|
||||||
[node name="MeshInstance" type="MeshInstance" parent="NavigationMeshInstance"]
|
[node name="MeshInstance" type="MeshInstance" parent="NavigationMeshInstance"]
|
||||||
@ -81,6 +80,7 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0 )
|
|||||||
shape = SubResource( 7 )
|
shape = SubResource( 7 )
|
||||||
|
|
||||||
[node name="MeldewesenNavigator" parent="." instance=ExtResource( 2 )]
|
[node name="MeldewesenNavigator" parent="." instance=ExtResource( 2 )]
|
||||||
|
editor/display_folded = true
|
||||||
speed = 3.0
|
speed = 3.0
|
||||||
body_nodepath = NodePath("../MeldewesenNavigator/Meldewesen")
|
body_nodepath = NodePath("../MeldewesenNavigator/Meldewesen")
|
||||||
|
|
||||||
@ -91,12 +91,16 @@ _visibility_path = NodePath("../../MeldewesenNavigator/Meldewesen/Visibility")
|
|||||||
group_name = "Navigator"
|
group_name = "Navigator"
|
||||||
node_to_send = NodePath("..")
|
node_to_send = NodePath("..")
|
||||||
|
|
||||||
[node name="Key" parent="." instance=ExtResource( 5 )]
|
[node name="Key" parent="." groups=[
|
||||||
|
"Collectibles",
|
||||||
|
] instance=ExtResource( 5 )]
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -6.8315, 0.73042, 8.99112 )
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -6.8315, 0.73042, 8.99112 )
|
||||||
key_id = 1
|
key_id = 1
|
||||||
|
|
||||||
[node name="Keycard" parent="." instance=ExtResource( 6 )]
|
[node name="Keycard" parent="." groups=[
|
||||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -6.84089, 0.700821, 8.67166 )
|
"Collectibles",
|
||||||
|
] instance=ExtResource( 6 )]
|
||||||
|
transform = Transform( -1, 0, -8.74228e-008, 0, 1, 0, 8.74228e-008, 0, -1, -6.84089, 0.700821, 8.67166 )
|
||||||
card_lvl = 1
|
card_lvl = 1
|
||||||
|
|
||||||
[node name="Door" parent="." instance=ExtResource( 7 )]
|
[node name="Door" parent="." instance=ExtResource( 7 )]
|
||||||
|
221
Level/World.tscn
221
Level/World.tscn
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