void Awake() { m_TurnManager = GameObject.FindGameObjectWithTag(Tags.BATTLE_CONTROLLER).GetComponent<PCTurnManagerComponent>(); m_Transform = GetComponent<RectTransform>(); m_CurrentEntity = null; m_CurrentDecisionState = PCTurnManagerComponent.DecisionState.IDLE; }
void OnGUI() { PCBattleEntity entity = m_TurnManager.currentEntity; PCTurnManagerComponent.DecisionState decisionState = m_TurnManager.decisionState; if (m_CurrentEntity != entity || m_CurrentDecisionState != decisionState) { m_CurrentEntity = entity; m_CurrentDecisionState = decisionState; PopulateActions (entity, decisionState); } }