
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
| Fields | Description |
|---|---|
| Showing | FlexyAction that raise right after show |
| Hiding | FlexyAction that raise right after hide |
Properties
| Property | Description |
|---|---|
| Flow | Access Service_GameFlow |
| Graph | Access FlowGraph |
| Node | FlowNode currently connected to State |
| PrefabRef | AssetRef to state Prefab |
| OpenParams | Parameters this node is opened with |
| IsOpened | true if node still part of the graph false otherwise |
| IsShowed | true if node state is currently showed |
| AnySubStateOpened | true if node has opened substates |
| GameStage | gets nearest parent GameStage |
| virtual MainSubStateRef | Must return StateRef in case state designerd to have main substate |
see BindableBehaviour for inherited ones
Methods
| Method | Description | |
|---|---|---|
| OpenMainSubState | Opens Main Sub State if State has MainSubStateRef and close all to the main if it already opened | |
| Close | Close state. GameObject remain alive and will be reused for future opening | |
| CloseAndDestroy | Close state and Destroy state GameObject | |
| CloseSubStates | Close all substates with or whtout main substate | |
| RebindAllHierarchy | Get all BindableBehaviours in Children and call RebindAll on them | |
| virtual TryGoBack | override reaction ToTryGoBack, return true to allow go back otherwise false | |
| virtual OnOpen | Event. Happens when State Open | |
| virtual OnShow | Event. Happens when State Shows first time for Opened FlowNode | |
| virtual OnForward | Event. Happens when next State Open when this stop becoming Last one in history | |
| virtual OnFwdHide | Event. Happens when State Hidden because next one in hostory Showing | |
| virtual OnBack | Event. Happens when next State closed and current become last in history again | |
| virtual OnBackShow | Event. Happens when State Showing because next was closed | |
| virtual OnClosing | Event. Happend when State is closed and no more part of history | |
| virtual OnHide | Event. Happens when State Hidden because node closed and no more part of history | |
| virtual OnChildOpen | Event. Happens before child opened | |
| virtual OnChildShow | Event. Happens before child showed | |
| virtual OnChildClose | Event. Happens after child hide | |
| virtual OnChildHide | Event. Happens after child hide |
see BindableBehaviour for inherited ones