public void UnsetUIComponentAll() { switch (currCanvasType) { case CanvasType.Main: case CanvasType.Select: case CanvasType.Battle: case CanvasType.Dialog: UINormalState normalState = (UINormalState)stateMachine.stateStack.Peek(); normalState._canvas.TurnOffAllUI(); break; } }
public T GetUIComponent <T>(bool evenInactive = false) where T : PanelUIComponent { UIState uiState = (UIState)stateMachine.stateStack.Peek(); switch (currCanvasType) { case CanvasType.Main: case CanvasType.Select: case CanvasType.Battle: case CanvasType.Dialog: UINormalState normalState = (UINormalState)uiState; return(normalState._canvas.GetUIComponent <T>(evenInactive)); default: return(null); } }
public void SetUIComponent <T>(UIParam uiParam = null, bool isOn = true) where T : PanelUIComponent { switch (currCanvasType) { case CanvasType.Main: case CanvasType.Select: case CanvasType.Battle: case CanvasType.Dialog: UINormalState normalState = (UINormalState)stateMachine.stateStack.Peek(); if (isOn) { normalState._canvas.GetUIComponent <T>().SetPanel(uiParam); } else { normalState._canvas.GetUIComponent <T>().UnsetPanel(); } break; } }
public BaseCanvas GetCurrentCanvas() { UINormalState uns = (UINormalState)stateMachine.stateStack.Peek(); return(uns._canvas); }