mmhh 1 wall for inside factory
This commit is contained in:
parent
468c574763
commit
1317c73942
@ -1,6 +1,6 @@
|
||||
extends Node
|
||||
|
||||
const _increase_per_second: float = 100.0 #0.5
|
||||
const _increase_per_second: float = 0.0 #0.5
|
||||
const _max: int = 1440 # 24 hour + 60 mins
|
||||
|
||||
var _time: float setget _set_time, get_time
|
||||
|
77
Level/InFactory.tscn
Normal file
77
Level/InFactory.tscn
Normal file
@ -0,0 +1,77 @@
|
||||
[gd_scene load_steps=7 format=2]
|
||||
|
||||
[ext_resource path="res://Level/Interactables/Door/Door.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://Characters/Player/Player.tscn" type="PackedScene" id=2]
|
||||
|
||||
[sub_resource type="CubeMesh" id=4]
|
||||
|
||||
[sub_resource type="BoxShape" id=5]
|
||||
|
||||
[sub_resource type="BoxShape" id=6]
|
||||
|
||||
[sub_resource type="CubeMesh" id=7]
|
||||
|
||||
[node name="InFactory" type="Spatial"]
|
||||
|
||||
[node name="Architecture" type="Spatial" parent="."]
|
||||
|
||||
[node name="EntryHall" type="Spatial" parent="Architecture"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2 )
|
||||
|
||||
[node name="WallPart1" type="StaticBody" parent="Architecture/EntryHall"]
|
||||
transform = Transform( 2, 0, 0, 0, 1.5, 0, 0, 0, 0.2, -4, 1.5, 0 )
|
||||
collision_layer = 3
|
||||
|
||||
[node name="MeshInstance" type="MeshInstance" parent="Architecture/EntryHall/WallPart1"]
|
||||
layers = 3
|
||||
mesh = SubResource( 4 )
|
||||
material/0 = null
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape" parent="Architecture/EntryHall/WallPart1"]
|
||||
shape = SubResource( 5 )
|
||||
|
||||
[node name="WallPart2" type="StaticBody" parent="Architecture/EntryHall"]
|
||||
transform = Transform( 2, 0, 0, 0, 1.5, 0, 0, 0, 0.2, 4, 1.5, 0 )
|
||||
collision_layer = 3
|
||||
|
||||
[node name="MeshInstance" type="MeshInstance" parent="Architecture/EntryHall/WallPart2"]
|
||||
layers = 3
|
||||
mesh = SubResource( 4 )
|
||||
material/0 = null
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape" parent="Architecture/EntryHall/WallPart2"]
|
||||
shape = SubResource( 5 )
|
||||
|
||||
[node name="WallPart3" type="StaticBody" parent="Architecture/EntryHall"]
|
||||
transform = Transform( 6, 0, 0, 0, 1, 0, 0, 0, 0.2, 0, 4, 0 )
|
||||
collision_layer = 3
|
||||
|
||||
[node name="MeshInstance" type="MeshInstance" parent="Architecture/EntryHall/WallPart3"]
|
||||
layers = 3
|
||||
mesh = SubResource( 4 )
|
||||
material/0 = null
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape" parent="Architecture/EntryHall/WallPart3"]
|
||||
shape = SubResource( 5 )
|
||||
|
||||
[node name="Door" parent="Architecture/EntryHall" instance=ExtResource( 1 )]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 1.5, 0 )
|
||||
|
||||
[node name="Door2" parent="Architecture/EntryHall" instance=ExtResource( 1 )]
|
||||
transform = Transform( -1, 0, -8.74228e-008, 0, 1, 0, 8.74228e-008, 0, -1, 2, 1.5, 0 )
|
||||
invert_open = true
|
||||
|
||||
[node name="Floor" type="StaticBody" parent="Architecture"]
|
||||
transform = Transform( 100, 0, 0, 0, 1, 0, 0, 0, 100, 0, -1, 0 )
|
||||
collision_layer = 3
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape" parent="Architecture/Floor"]
|
||||
shape = SubResource( 6 )
|
||||
|
||||
[node name="MeshInstance" type="MeshInstance" parent="Architecture/Floor"]
|
||||
layers = 3
|
||||
mesh = SubResource( 7 )
|
||||
material/0 = null
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource( 2 )]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4, 0 )
|
@ -1,6 +1,7 @@
|
||||
extends KinematicBody
|
||||
|
||||
# export variables
|
||||
export(bool) var invert_open
|
||||
export(bool) var card_door
|
||||
export(int) var door_lvl
|
||||
|
||||
@ -14,11 +15,15 @@ var _startingRotY : float
|
||||
var _isMoving = false
|
||||
var _isOpening = false
|
||||
var _degrees = 0
|
||||
var _opening_dir = 1
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
_startingRotY = global_transform.basis.get_euler().y
|
||||
outline = get_node("DoorMesh/Outline") as MeshInstance
|
||||
|
||||
if invert_open:
|
||||
_opening_dir = -1
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
@ -56,4 +61,4 @@ func _door_move(delta):
|
||||
_degrees = 0
|
||||
_isMoving = false
|
||||
|
||||
rotate_y(_degrees * PI/180 - global_transform.basis.get_euler().y + _startingRotY)
|
||||
rotate_y(_degrees * _opening_dir * PI/180 - global_transform.basis.get_euler().y + _startingRotY)
|
||||
|
@ -28,7 +28,7 @@ surfaces/0 = {
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[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, 1.5, 0, 0, 0, 0.1, 1, 0, 0 )
|
||||
layers = 3
|
||||
mesh = SubResource( 1 )
|
||||
material/0 = null
|
||||
|
@ -243,7 +243,6 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 73, 0, -88 )
|
||||
[node name="Factory" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )]
|
||||
|
||||
[node name="Ground" type="MeshInstance" parent="NavigationMeshInstance"]
|
||||
editor/display_folded = true
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -83.9196, -0.0216179, -105.861 )
|
||||
layers = 3
|
||||
mesh = SubResource( 3 )
|
||||
|
Loading…
x
Reference in New Issue
Block a user