Merge branch 'master' of https://gitlab.hexaquo.at/mga/retrace
This commit is contained in:
commit
8e20b198b4
@ -176,7 +176,7 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0461721, 1.84617, 0 )
|
||||
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 )
|
||||
transform = Transform( -1, 0, -8.74228e-008, 0, 1, 0, 8.74228e-008, 0, -1, 0, 0, 0 )
|
||||
enabled = true
|
||||
cast_to = Vector3( 0, 0, 2 )
|
||||
|
||||
@ -261,14 +261,13 @@ unit_db = -25.0
|
||||
pitch_scale = 1.5
|
||||
|
||||
[node name="HUD" parent="." instance=ExtResource( 10 )]
|
||||
editor/display_folded = true
|
||||
|
||||
[node name="PillTaker" type="Spatial" parent="."]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0 )
|
||||
script = ExtResource( 11 )
|
||||
|
||||
[node name="Pills" parent="PillTaker" instance=ExtResource( 12 )]
|
||||
transform = Transform( 0.1, 0, 0, 0, -4.37114e-09, 0.1, 0, -0.1, -4.37114e-09, 0, 0.7, 0 )
|
||||
transform = Transform( 0.1, 0, 0, 0, -4.37114e-009, 0.1, 0, -0.1, -4.37114e-009, 0, 0.7, 0 )
|
||||
visible = false
|
||||
|
||||
[node name="InteractArea" type="Area" parent="."]
|
||||
|
@ -5,6 +5,7 @@ var _labelPillLevel: Label
|
||||
var _pillLevel: TextureProgress
|
||||
var _labelDayTime: Label
|
||||
var _dayTime: ProgressBar
|
||||
var _dayTimeVisual: TextureRect
|
||||
|
||||
onready var _keyTexture = load("res://Resources/Models/key/key.png")
|
||||
onready var _cardTexture = load("res://Resources/Models/keycard/keycard.png")
|
||||
@ -16,6 +17,7 @@ func _ready():
|
||||
_pillLevel = get_node("PillProgress")
|
||||
_labelDayTime = get_node("DayTime")
|
||||
_dayTime = get_node("DayTimeProgress")
|
||||
_dayTimeVisual = get_node("DayTimeVisual")
|
||||
|
||||
# TODO: may use global values in Inspector?
|
||||
_pillLevel.max_value = Pills.get_max()
|
||||
@ -42,4 +44,6 @@ func _process(_delta):
|
||||
_pillLevel.value = Pills.get_level()
|
||||
var val = int(Daytime.get_time())
|
||||
_labelDayTime.text = "dayTime: " + String(val) + " - %02d:%02d" % [val/60%24, val%60]
|
||||
_dayTime.value = Daytime.get_time()
|
||||
_dayTime.value = Daytime.get_time()
|
||||
|
||||
_dayTimeVisual.rect_rotation = (val/_dayTime.max_value) * 360 #pivot offset x=67, y = 7
|
@ -1,9 +1,10 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://Characters/Player/UI/UI.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Resources/Fonts/MainFont.tres" type="DynamicFont" id=2]
|
||||
[ext_resource path="res://Resources/Textures/pillLevel_fill.png" type="Texture" id=3]
|
||||
[ext_resource path="res://Resources/Textures/crosshair.png" type="Texture" id=4]
|
||||
[ext_resource path="res://Resources/Textures/daytimeUI.png" type="Texture" id=4]
|
||||
[ext_resource path="res://Resources/Textures/crosshair.png" type="Texture" id=5]
|
||||
|
||||
[node name="HUD" type="Control"]
|
||||
anchor_right = 1.0
|
||||
@ -60,6 +61,17 @@ margin_left = 850.901
|
||||
margin_top = 30.7722
|
||||
margin_right = 988.901
|
||||
margin_bottom = 44.7722
|
||||
rect_pivot_offset = Vector2( 67.8153, 7.2278 )
|
||||
|
||||
[node name="DayTimeVisual" type="TextureRect" parent="."]
|
||||
margin_left = 466.0
|
||||
margin_top = -82.0
|
||||
margin_right = 646.0
|
||||
margin_bottom = 98.0
|
||||
rect_pivot_offset = Vector2( 90, 90 )
|
||||
texture = ExtResource( 4 )
|
||||
expand = true
|
||||
stretch_mode = 1
|
||||
|
||||
[node name="CrossHair" type="Control" parent="."]
|
||||
anchor_left = 0.5
|
||||
@ -80,6 +92,6 @@ margin_left = -20.0
|
||||
margin_top = -20.0
|
||||
margin_right = 20.0
|
||||
margin_bottom = 20.0
|
||||
texture = ExtResource( 4 )
|
||||
texture = ExtResource( 5 )
|
||||
expand = true
|
||||
stretch_mode = 4
|
||||
|
@ -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
|
||||
|
@ -45,6 +45,7 @@ _data = {
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 7 )
|
||||
|
||||
[node name="Collectibles" type="Spatial" parent="."]
|
||||
editor/display_folded = true
|
||||
transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, 15.0831, 1.63203, 13.0809 )
|
||||
|
||||
[node name="Keycard" parent="Collectibles" groups=[
|
||||
@ -84,6 +85,7 @@ navmesh = SubResource( 2 )
|
||||
transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, 13, 0, 14 )
|
||||
|
||||
[node name="BuildingBlocks" type="Spatial" parent="NavigationMeshInstance"]
|
||||
editor/display_folded = true
|
||||
|
||||
[node name="BuildingBlock" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 7 )]
|
||||
transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, -13, 0, -13 )
|
||||
@ -243,7 +245,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 )
|
||||
@ -257,13 +258,12 @@ collision_mask = 7
|
||||
shape = SubResource( 4 )
|
||||
|
||||
[node name="Environment" type="Spatial" parent="."]
|
||||
editor/display_folded = true
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="Environment"]
|
||||
environment = SubResource( 6 )
|
||||
|
||||
[node name="DirectionalLight" type="DirectionalLight" parent="Environment"]
|
||||
transform = Transform( 0.642788, -0.262003, -0.719846, 0, -0.939693, 0.34202, -0.766044, -0.219846, -0.604023, 0, 7, 0 )
|
||||
transform = Transform( 0.642788, -0.262003, -0.719846, -8.21505e-008, -0.939693, 0.34202, -0.766044, -0.219847, -0.604023, 0, 7, 0 )
|
||||
layers = 3
|
||||
shadow_enabled = true
|
||||
|
||||
|
BIN
Resources/Textures/daytimeUI.png
Normal file
BIN
Resources/Textures/daytimeUI.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
34
Resources/Textures/daytimeUI.png.import
Normal file
34
Resources/Textures/daytimeUI.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/daytimeUI.png-a89afbe1a4ac4d3196050a6f27e3eb5a.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Resources/Textures/daytimeUI.png"
|
||||
dest_files=[ "res://.import/daytimeUI.png-a89afbe1a4ac4d3196050a6f27e3eb5a.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
Loading…
x
Reference in New Issue
Block a user