Merge branch 'master' of https://gitlab.hexaquo.at/mga/retrace
This commit is contained in:
commit
b7a53651bb
@ -75,7 +75,7 @@ func _process(_delta):
|
|||||||
# movement
|
# movement
|
||||||
if current_target:
|
if current_target:
|
||||||
if _prev_target != current_target:
|
if _prev_target != current_target:
|
||||||
Logger.info("current target: " + String(current_target))
|
#Logger.info("current target: " + String(current_target))
|
||||||
_prev_target = current_target
|
_prev_target = current_target
|
||||||
|
|
||||||
# continue following player after illegal action or low pill level
|
# continue following player after illegal action or low pill level
|
||||||
|
@ -6,6 +6,7 @@ export(NodePath) var lookingAt_nodepath
|
|||||||
export(NodePath) var animationWalk_nodepath
|
export(NodePath) var animationWalk_nodepath
|
||||||
export(NodePath) var animationFadeOut_nodepath
|
export(NodePath) var animationFadeOut_nodepath
|
||||||
export(NodePath) var ui_interact_nodepath
|
export(NodePath) var ui_interact_nodepath
|
||||||
|
export(NodePath) var ui_message_nodepath
|
||||||
export(NodePath) var camera_nodepath
|
export(NodePath) var camera_nodepath
|
||||||
export(int) var keycard_lvl
|
export(int) var keycard_lvl
|
||||||
export(Array) var key_chain
|
export(Array) var key_chain
|
||||||
@ -27,6 +28,7 @@ var _lookCast: RayCast
|
|||||||
var _animationWalk: AnimationPlayer
|
var _animationWalk: AnimationPlayer
|
||||||
var _animationFadeOut: AnimationPlayer
|
var _animationFadeOut: AnimationPlayer
|
||||||
var _labelInteract: Label
|
var _labelInteract: Label
|
||||||
|
var _labelMessage: Label
|
||||||
var _dir = Vector3()
|
var _dir = Vector3()
|
||||||
var _vel = Vector3()
|
var _vel = Vector3()
|
||||||
var _is_sprinting : bool
|
var _is_sprinting : bool
|
||||||
@ -72,6 +74,9 @@ func _ready():
|
|||||||
_labelInteract = get_node(ui_interact_nodepath) as Label
|
_labelInteract = get_node(ui_interact_nodepath) as Label
|
||||||
assert(null != _labelInteract)
|
assert(null != _labelInteract)
|
||||||
|
|
||||||
|
_labelMessage = get_node(ui_message_nodepath) as Label
|
||||||
|
assert(null != _labelMessage)
|
||||||
|
|
||||||
# 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
|
||||||
@ -98,6 +103,16 @@ func _ready():
|
|||||||
player.stream = load("res://Resources/Audio/cock.wav")
|
player.stream = load("res://Resources/Audio/cock.wav")
|
||||||
player.play()
|
player.play()
|
||||||
|
|
||||||
|
func showMessage (text, duration):
|
||||||
|
_labelMessage.text = text
|
||||||
|
# animation
|
||||||
|
var timer = _inventory.get_node("Timer") as Timer
|
||||||
|
timer.wait_time = duration
|
||||||
|
timer.start()
|
||||||
|
_labelMessage.show()
|
||||||
|
yield(timer, "timeout")
|
||||||
|
_labelMessage.hide()
|
||||||
|
|
||||||
|
|
||||||
func _physics_process(delta):
|
func _physics_process(delta):
|
||||||
process_input()
|
process_input()
|
||||||
@ -244,7 +259,7 @@ func _on_area_exited (area: Area):
|
|||||||
|
|
||||||
|
|
||||||
func _on_respawn ():
|
func _on_respawn ():
|
||||||
Logger.info("respawning")
|
#Logger.info("respawning")
|
||||||
# fade to black and restart scene
|
# fade to black and restart scene
|
||||||
_inventory.hide() # disable hud for the time of respawn animation
|
_inventory.hide() # disable hud for the time of respawn animation
|
||||||
|
|
||||||
|
@ -158,6 +158,7 @@ random_pitch = 1.3
|
|||||||
[node name="Player" type="KinematicBody" groups=[
|
[node name="Player" type="KinematicBody" groups=[
|
||||||
"Player",
|
"Player",
|
||||||
]]
|
]]
|
||||||
|
editor/display_folded = true
|
||||||
collision_layer = 5
|
collision_layer = 5
|
||||||
collision_mask = 5
|
collision_mask = 5
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
@ -166,6 +167,7 @@ lookingAt_nodepath = NodePath("Body/PillCameras/LookingAt")
|
|||||||
animationWalk_nodepath = NodePath("WalkAnimationPlayer")
|
animationWalk_nodepath = NodePath("WalkAnimationPlayer")
|
||||||
animationFadeOut_nodepath = NodePath("FadeOutAnimationPlayer")
|
animationFadeOut_nodepath = NodePath("FadeOutAnimationPlayer")
|
||||||
ui_interact_nodepath = NodePath("HUD/PressInteract")
|
ui_interact_nodepath = NodePath("HUD/PressInteract")
|
||||||
|
ui_message_nodepath = NodePath("HUD/Info")
|
||||||
camera_nodepath = NodePath("Body/PillCameras")
|
camera_nodepath = NodePath("Body/PillCameras")
|
||||||
|
|
||||||
[node name="Body" type="Spatial" parent="."]
|
[node name="Body" type="Spatial" parent="."]
|
||||||
|
@ -13,6 +13,9 @@ margin_left = 10.2837
|
|||||||
margin_right = 10.2837
|
margin_right = 10.2837
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="Timer" type="Timer" parent="."]
|
||||||
|
one_shot = true
|
||||||
|
|
||||||
[node name="PressInteract" type="Label" parent="."]
|
[node name="PressInteract" type="Label" parent="."]
|
||||||
visible = false
|
visible = false
|
||||||
modulate = Color( 0, 0, 0, 1 )
|
modulate = Color( 0, 0, 0, 1 )
|
||||||
@ -28,27 +31,49 @@ margin_bottom = -34.8594
|
|||||||
custom_fonts/font = ExtResource( 2 )
|
custom_fonts/font = ExtResource( 2 )
|
||||||
text = "Press 'E' to interact"
|
text = "Press 'E' to interact"
|
||||||
|
|
||||||
|
[node name="Info" type="Label" parent="."]
|
||||||
|
visible = false
|
||||||
|
modulate = Color( 0, 0, 0, 1 )
|
||||||
|
self_modulate = Color( 0, 0, 0, 1 )
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 1.0
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
margin_left = -153.0
|
||||||
|
margin_top = -106.0
|
||||||
|
margin_right = 153.0
|
||||||
|
margin_bottom = -82.0
|
||||||
|
custom_fonts/font = ExtResource( 2 )
|
||||||
|
text = "you don't havve the right key"
|
||||||
|
align = 1
|
||||||
|
|
||||||
[node name="InventoryContainer" type="GridContainer" parent="."]
|
[node name="InventoryContainer" type="GridContainer" parent="."]
|
||||||
margin_left = 868.0
|
anchor_left = 1.0
|
||||||
margin_top = 48.0
|
anchor_top = 0.5
|
||||||
margin_right = 1007.0
|
anchor_right = 1.0
|
||||||
margin_bottom = 565.0
|
anchor_bottom = 0.5
|
||||||
|
margin_left = -151.0
|
||||||
|
margin_top = -258.5
|
||||||
|
margin_right = -12.0
|
||||||
|
margin_bottom = 258.5
|
||||||
|
|
||||||
[node name="PillLevel" type="Label" parent="."]
|
[node name="PillLevel" type="Label" parent="."]
|
||||||
|
visible = false
|
||||||
margin_right = 40.0
|
margin_right = 40.0
|
||||||
margin_bottom = 14.0
|
margin_bottom = 14.0
|
||||||
|
|
||||||
[node name="PillProgress" type="TextureProgress" parent="."]
|
[node name="PillProgress" type="TextureProgress" parent="."]
|
||||||
margin_left = -0.571533
|
margin_left = -0.571533
|
||||||
margin_top = 24.7845
|
margin_top = 9.7845
|
||||||
margin_right = 247.428
|
margin_right = 247.428
|
||||||
margin_bottom = 64.7845
|
margin_bottom = 49.7845
|
||||||
max_value = 7.0
|
max_value = 7.0
|
||||||
step = 0.1
|
step = 0.1
|
||||||
value = 6.0
|
value = 6.0
|
||||||
texture_progress = ExtResource( 3 )
|
texture_progress = ExtResource( 3 )
|
||||||
|
|
||||||
[node name="DayTime" type="Label" parent="."]
|
[node name="DayTime" type="Label" parent="."]
|
||||||
|
visible = false
|
||||||
anchor_left = 1.0
|
anchor_left = 1.0
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
margin_left = -170.14
|
margin_left = -170.14
|
||||||
@ -57,6 +82,7 @@ margin_right = -130.14
|
|||||||
margin_bottom = 21.3664
|
margin_bottom = 21.3664
|
||||||
|
|
||||||
[node name="DayTimeProgress" type="ProgressBar" parent="."]
|
[node name="DayTimeProgress" type="ProgressBar" parent="."]
|
||||||
|
visible = false
|
||||||
margin_left = 850.901
|
margin_left = 850.901
|
||||||
margin_top = 30.7722
|
margin_top = 30.7722
|
||||||
margin_right = 988.901
|
margin_right = 988.901
|
||||||
@ -64,11 +90,11 @@ margin_bottom = 44.7722
|
|||||||
rect_pivot_offset = Vector2( 67.8153, 7.2278 )
|
rect_pivot_offset = Vector2( 67.8153, 7.2278 )
|
||||||
|
|
||||||
[node name="DayTimeVisual" type="TextureRect" parent="."]
|
[node name="DayTimeVisual" type="TextureRect" parent="."]
|
||||||
anchor_left = 0.5
|
anchor_left = 1.0
|
||||||
anchor_right = 0.5
|
anchor_right = 1.0
|
||||||
margin_left = -90.0
|
margin_left = -245.0
|
||||||
margin_top = -90.0
|
margin_top = -90.0
|
||||||
margin_right = 90.0
|
margin_right = -65.0
|
||||||
margin_bottom = 90.0
|
margin_bottom = 90.0
|
||||||
rect_rotation = 180.0
|
rect_rotation = 180.0
|
||||||
rect_pivot_offset = Vector2( 90, 90 )
|
rect_pivot_offset = Vector2( 90, 90 )
|
||||||
|
@ -39,11 +39,13 @@ func do_interact(var player):
|
|||||||
_isOpening = !_isOpening
|
_isOpening = !_isOpening
|
||||||
else:
|
else:
|
||||||
print("keycard level too low")
|
print("keycard level too low")
|
||||||
|
player.showMessage("keycard level too low", 3)
|
||||||
elif player.key_chain.has(door_lvl) or door_lvl == 0:
|
elif player.key_chain.has(door_lvl) or door_lvl == 0:
|
||||||
_isMoving = true
|
_isMoving = true
|
||||||
_isOpening = !_isOpening
|
_isOpening = !_isOpening
|
||||||
else:
|
else:
|
||||||
print("you don't have the right key")
|
print("you don't have the right key")
|
||||||
|
player.showMessage("you don't have the right key", 3)
|
||||||
|
|
||||||
|
|
||||||
# opens or closes the door
|
# opens or closes the door
|
||||||
|
@ -39,6 +39,7 @@ surfaces/0 = {
|
|||||||
|
|
||||||
[node name="Key" type="StaticBody" groups=[
|
[node name="Key" type="StaticBody" groups=[
|
||||||
"Touchables",
|
"Touchables",
|
||||||
|
"Collectibles",
|
||||||
]]
|
]]
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
|
@ -52,6 +52,7 @@ surfaces/0 = {
|
|||||||
|
|
||||||
[node name="Keycard" type="StaticBody" groups=[
|
[node name="Keycard" type="StaticBody" groups=[
|
||||||
"Touchables",
|
"Touchables",
|
||||||
|
"Collectibles",
|
||||||
]]
|
]]
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 8.9 KiB |
@ -1,34 +0,0 @@
|
|||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/keycard.png-1b5932f2383ba2cd4c771ca169fe169c.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://Resources/Models/keycard/keycard.png"
|
|
||||||
dest_files=[ "res://.import/keycard.png-1b5932f2383ba2cd4c771ca169fe169c.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