From b1220c5e3077371b854786f46d8636686fc0a827 Mon Sep 17 00:00:00 2001 From: Federico Gratti Date: Tue, 6 Jul 2021 15:29:49 +0200 Subject: [PATCH] Replace update_transition method --- .version | 2 +- package.json | 2 +- src/view_components/ViewState.js | 13 ++++++++++++- .../transition/ViewStateTransitionHandler.js | 3 ++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.version b/.version index e2f9fbf..339cbf2 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -v5.9.7 +v5.10.0 diff --git a/package.json b/package.json index 90c78c1..2edcd8e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ohzi-core", - "version": "5.9.7", + "version": "5.10.0", "description": "OHZI Core Library", "module": "build/index.module.js", "source": "src/index.js", diff --git a/src/view_components/ViewState.js b/src/view_components/ViewState.js index 8592615..831fbfe 100644 --- a/src/view_components/ViewState.js +++ b/src/view_components/ViewState.js @@ -29,7 +29,18 @@ export default class ViewState { } - update_transition(global_view_data, transition_progress) + update_enter_transition(global_view_data, transition_progress, action_sequencer) + { + // Backward compatibility. It will be removed in future releases. + this.update_transition(global_view_data, transition_progress, action_sequencer); + } + + update_exit_transition(global_view_data, transition_progress, action_sequencer) + { + } + + // Deprecated + update_transition(global_view_data, transition_progress, action_sequencer) { } diff --git a/src/view_components/transition/ViewStateTransitionHandler.js b/src/view_components/transition/ViewStateTransitionHandler.js index 3eb7b70..8188dab 100644 --- a/src/view_components/transition/ViewStateTransitionHandler.js +++ b/src/view_components/transition/ViewStateTransitionHandler.js @@ -42,7 +42,8 @@ export default class ViewStateTransitionHandler if (this.transitioning) { this.action_sequencer.update(Time.delta_time); - this.current_state.update_transition(this.current_state_data, this.action_sequencer.get_progress(), this.action_sequencer); + this.last_state.update_exit_transition(this.current_state_data, this.action_sequencer.get_progress(), this.action_sequencer); + this.current_state.update_enter_transition(this.current_state_data, this.action_sequencer.get_progress(), this.action_sequencer); if (this.action_sequencer.is_finished()) {