race condition using global fade_node, removing and replacing with simple hide/show for now, will revisit
This commit is contained in:
parent
249c58af46
commit
6013c08892
@ -40,11 +40,21 @@ enabled=PackedStringArray("res://addons/godot-vim/plugin.cfg")
|
|||||||
|
|
||||||
game_speed_fast={
|
game_speed_fast={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":61,"key_label":0,"unicode":61,"location":0,"echo":false,"script":null)
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":true,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":61,"key_label":0,"unicode":43,"location":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
game_speed_normal={
|
game_speed_normal={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":48,"key_label":0,"unicode":48,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
game_speed_faster={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":61,"key_label":0,"unicode":61,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
game_speed_slower={
|
||||||
|
"deadzone": 0.5,
|
||||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":45,"key_label":0,"unicode":45,"location":0,"echo":false,"script":null)
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":45,"key_label":0,"unicode":45,"location":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -110,6 +110,10 @@ func _input(event: InputEvent) -> void:
|
|||||||
Engine.time_scale = 10.0
|
Engine.time_scale = 10.0
|
||||||
if event.is_action_pressed("game_speed_normal"):
|
if event.is_action_pressed("game_speed_normal"):
|
||||||
Engine.time_scale = 1.0
|
Engine.time_scale = 1.0
|
||||||
|
if event.is_action_pressed("game_speed_faster"):
|
||||||
|
Engine.time_scale += 1.0
|
||||||
|
if event.is_action_pressed("game_speed_slower"):
|
||||||
|
Engine.time_scale -= 1.0
|
||||||
|
|
||||||
|
|
||||||
func save_game() -> void:
|
func save_game() -> void:
|
||||||
|
@ -34,8 +34,8 @@ func _quest_goal_check(enemyKillType: Globals.World.Faction) -> void:
|
|||||||
$QuestProgress/CompletedVal.text = str(self.goalCurrent)
|
$QuestProgress/CompletedVal.text = str(self.goalCurrent)
|
||||||
if self.goalCurrent == self.goalTotal:
|
if self.goalCurrent == self.goalTotal:
|
||||||
SignalBus.quest_completed.emit()
|
SignalBus.quest_completed.emit()
|
||||||
Globals.fade_node(%QuestComplete, "in", 0.1)
|
# Globals.fade_node(%QuestComplete, "in", 0.1)
|
||||||
Globals.fade_node(%QuestProgress, "out", 0.1)
|
# Globals.fade_node(%QuestProgress, "out", 0.1)
|
||||||
|
|
||||||
|
|
||||||
func _generate_random_quest() -> void:
|
func _generate_random_quest() -> void:
|
||||||
|
@ -16,7 +16,7 @@ var current_area_duration: float
|
|||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
if OS.is_debug_build():
|
if OS.is_debug_build():
|
||||||
%DebugMenu.show()
|
%DebugMenu.show()
|
||||||
Engine.time_scale = 10.0
|
Engine.time_scale = 60.0
|
||||||
|
|
||||||
SignalBus.quest_generated.connect(_on_quest_generated)
|
SignalBus.quest_generated.connect(_on_quest_generated)
|
||||||
SignalBus.quest_completed.connect(_on_quest_completed)
|
SignalBus.quest_completed.connect(_on_quest_completed)
|
||||||
@ -57,14 +57,15 @@ func _go_next_area() -> void:
|
|||||||
%QuestsContainer.remove_child(prevAreaQuest)
|
%QuestsContainer.remove_child(prevAreaQuest)
|
||||||
# Globals.debug_print("gna quest removed")
|
# Globals.debug_print("gna quest removed")
|
||||||
# FIXME: rethink logic flow, memory/nodes leaking like a seive
|
# FIXME: rethink logic flow, memory/nodes leaking like a seive
|
||||||
# prevAreaQuest.queue_free()
|
prevAreaQuest.queue_free()
|
||||||
totalAreas += 1
|
totalAreas += 1
|
||||||
%AreaCountVal.text = str(totalAreas)
|
%AreaCountVal.text = str(totalAreas)
|
||||||
# Globals.debug_print("gna quest queued to free")
|
# Globals.debug_print("gna quest queued to free")
|
||||||
_create_area()
|
_create_area()
|
||||||
# Globals.debug_print("gna new area created")
|
# Globals.debug_print("gna new area created")
|
||||||
# _continue_button_hide()
|
# _continue_button_hide()
|
||||||
Globals.fade_node(%UITop/ContinueButton, "out", 0.1)
|
# Globals.fade_node(%UITop/ContinueButton, "out", 0.1)
|
||||||
|
%UITop/ContinueButton.hide()
|
||||||
current_area_duration = 0
|
current_area_duration = 0
|
||||||
canContinue = false
|
canContinue = false
|
||||||
|
|
||||||
@ -78,7 +79,8 @@ func _on_quest_completed() -> void:
|
|||||||
if %UITop/AutoCheck.button_pressed:
|
if %UITop/AutoCheck.button_pressed:
|
||||||
_go_next_area()
|
_go_next_area()
|
||||||
else:
|
else:
|
||||||
Globals.fade_node(%UITop/ContinueButton, "in", 0.25)
|
# Globals.fade_node(%UITop/ContinueButton, "in", 0.25)
|
||||||
|
%UITop/ContinueButton.show()
|
||||||
|
|
||||||
|
|
||||||
func _on_continue_button_pressed() -> void:
|
func _on_continue_button_pressed() -> void:
|
||||||
|
Loading…
Reference in New Issue
Block a user