changed prompt based on has key or not
This commit is contained in:
@ -12,6 +12,7 @@ var key_inserted:bool = false
|
|||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
animate.play("NoKey")
|
animate.play("NoKey")
|
||||||
|
prompt_message = need_key_prompt
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
if GlobalSettings.HasGeneratorKey:
|
if GlobalSettings.HasGeneratorKey:
|
||||||
@ -19,13 +20,12 @@ func _process(delta: float) -> void:
|
|||||||
prompt_message = key_inserted_prompt
|
prompt_message = key_inserted_prompt
|
||||||
else:
|
else:
|
||||||
prompt_message = has_key_prompt
|
prompt_message = has_key_prompt
|
||||||
else:
|
|
||||||
prompt_message = need_key_prompt
|
|
||||||
|
|
||||||
|
|
||||||
func interact(player):
|
func interact(player):
|
||||||
print("Panel pressed")
|
print("Panel pressed")
|
||||||
if GlobalSettings.HasGeneratorKey:
|
if GlobalSettings.HasGeneratorKey:
|
||||||
animate.play("InsertKey")
|
animate.play("InsertKey")
|
||||||
|
if key_inserted:
|
||||||
animate.play("Press")
|
animate.play("Press")
|
||||||
emit_signal("Generator_Started")
|
emit_signal("Generator_Started")
|
||||||
|
|||||||
Reference in New Issue
Block a user