Refactor owniverse state management; replace evolution class with state handling and update cycle logic
This commit is contained in:
+10
-4
@@ -244,9 +244,12 @@ func _ready() -> void:
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
|
||||
var year_delta: float = owniverse.add_time_delta(delta)
|
||||
set_datetime(year_delta)
|
||||
owniverse.cycle(year_delta)
|
||||
owniverse = owniverse.evolute(delta)
|
||||
set_datetime(owniverse.state.year)
|
||||
|
||||
owniverse.cycle(delta)
|
||||
|
||||
#owniverse.cycle_legacy(year_delta)
|
||||
|
||||
var actions = _check_counters(delta)
|
||||
_do_actions(actions)
|
||||
@@ -274,7 +277,10 @@ func _page_action_pressed(page_id: int, action_amount: float) -> void:
|
||||
|
||||
|
||||
func _change_speed(delta: int) -> void:
|
||||
var speed: int = owniverse.change_speed(delta)
|
||||
|
||||
owniverse.speed = owniverse.speed + delta
|
||||
|
||||
var speed: int = owniverse.speed
|
||||
var ind: int = 1
|
||||
for icon in g_speed_icons:
|
||||
if ind <= speed:
|
||||
|
||||
Reference in New Issue
Block a user