void Awake()
 {
     m_TurnManager = GameObject.FindGameObjectWithTag(Tags.BATTLE_CONTROLLER).GetComponent<PCTurnManagerComponent>();
     m_Transform = GetComponent<RectTransform>();
     m_CurrentEntity = null;
     m_CurrentDecisionState = PCTurnManagerComponent.DecisionState.IDLE;
 }
    protected override void OnInitialize()
    {
        // override parameters
        mBattleTimeQueue = new BattleTimeQueue();
        mTurnManager = GetComponent<PCTurnManagerComponent>();
        mTurnManager.OnCompleteDelegate += OnActionSelected;

        // initialize entities for other methods in start
        mBattleTimeQueue.InitEntities(mEntityManager.allEntities);
    }
    void PopulateActions(PCBattleEntity entity, PCTurnManagerComponent.DecisionState state)
    {
        // destroy old buttons
        while (m_Transform.childCount > 0) {
            Transform transform = m_Transform.GetChild(0);
            transform.SetParent(null);
            GameObject.Destroy(transform.gameObject);
        }

        if (entity == null) {
            return;
        }

        foreach (ICombatSkill skill in entity.SkillSet.skills) {
            GameObject actionPrefabInstance = (GameObject)Instantiate(m_ActionPrefab);
            RectTransform rect = actionPrefabInstance.GetComponent<RectTransform>();
            ActionGUIComponent actionGUI = actionPrefabInstance.GetComponent<ActionGUIComponent>();
            actionGUI.CombatSkill = skill;
            rect.SetParent(m_Transform);
        }
    }
    void PopulateTargets(PCBattleEntity entity, PCTurnManagerComponent.DecisionState state)
    {
        // destroy old buttons
        while (m_Transform.childCount > 0) {
            Transform transform = m_Transform.GetChild(0);
            transform.SetParent(null);
            GameObject.Destroy(transform.gameObject);
        }

        if (entity == null || state != PCTurnManagerComponent.DecisionState.TARGET) {
            return;
        }

        List<SelectableTarget> selectableTargets = m_TurnManager.currentTargetManager.targetList;
        foreach (SelectableTarget selectableTarget in selectableTargets) {
            GameObject actionPrefabInstance = (GameObject)Instantiate(m_TargetPrefab);
            RectTransform rect = actionPrefabInstance.GetComponent<RectTransform>();
            TargetGUIComponent targetGUI = actionPrefabInstance.GetComponent<TargetGUIComponent>();
            targetGUI.SelectableTarget = selectableTarget;
            rect.SetParent(m_Transform);
        }
    }
 void Awake()
 {
     m_TurnManager = GameObject.FindGameObjectWithTag(Tags.BATTLE_CONTROLLER).GetComponent<PCTurnManagerComponent>();
     m_Transform = GetComponent<RectTransform>();
 }
 void Awake()
 {
     m_TurnManager = GameObject.FindGameObjectWithTag (Tags.BATTLE_CONTROLLER).GetComponent<PCTurnManagerComponent> ();
     m_Button = m_ButtonGameObject.GetComponent<Button> ();
 }