Img

State

Description

Inherits from: Flexy.Core.Binding.BindableBehaviour

Main working horse
Derive from this class to create states of Your Game create prefabs of them and Open when needed

Component

FieldsDescription
ShowingFlexyAction that raise right after show
HidingFlexyAction that raise right after hide

Properties

PropertyDescription
FlowAccess Service_GameFlow
GraphAccess FlowGraph
NodeFlowNode currently connected to State
PrefabRefAssetRef to state Prefab
OpenParamsParameters this node is opened with
IsOpenedtrue if node still part of the graph false otherwise
IsShowedtrue if node state is currently showed
AnySubStateOpenedtrue if node has opened substates
GameStagegets nearest parent GameStage
virtual MainSubStateRefMust return StateRef in case state designerd to have main substate

see BindableBehaviour for inherited ones

Methods

MethodDescription
OpenMainSubStateOpens Main Sub State if State has MainSubStateRef and close all to the main if it already opened
CloseClose state. GameObject remain alive and will be reused for future opening
CloseAndDestroyClose state and Destroy state GameObject
CloseSubStatesClose all substates with or whtout main substate
RebindAllHierarchyGet all BindableBehaviours in Children and call RebindAll on them
virtual TryGoBackoverride reaction ToTryGoBack, return true to allow go back otherwise false
virtual OnOpenEvent. Happens when State Open
virtual OnShowEvent. Happens when State Shows first time for Opened FlowNode
virtual OnForwardEvent. Happens when next State Open when this stop becoming Last one in history
virtual OnFwdHideEvent. Happens when State Hidden because next one in hostory Showing
virtual OnBackEvent. Happens when next State closed and current become last in history again
virtual OnBackShowEvent. Happens when State Showing because next was closed
virtual OnClosingEvent. Happend when State is closed and no more part of history
virtual OnHideEvent. Happens when State Hidden because node closed and no more part of history
virtual OnChildOpenEvent. Happens before child opened
virtual OnChildShowEvent. Happens before child showed
virtual OnChildCloseEvent. Happens after child hide
virtual OnChildHideEvent. Happens after child hide

see BindableBehaviour for inherited ones