예제 #1
0
            public PanelCommand(BattleHUD scene, GameObject obj)
                : base(obj)
            {
                _scene = scene;

                Attack  = new GONavigationButton(obj.GetChild(0));
                Defend  = new GONavigationButton(obj.GetChild(1));
                Skill1  = new GONavigationButton(obj.GetChild(2));
                Skill2  = new GONavigationButton(obj.GetChild(3));
                Item    = new GONavigationButton(obj.GetChild(4));
                Change  = new GONavigationButton(obj.GetChild(5));
                Caption = new CaptionBackground(obj.GetChild(6));

                SubscribeOnClick();
            }
예제 #2
0
 public override Boolean OnItemSelect(GameObject go)
 {
     if (base.OnItemSelect(go))
     {
         if (ButtonGroupState.ActiveGroup == CommandGroupButton)
         {
             Int32 siblingIndex = go.transform.GetSiblingIndex();
             _currentCommandIndex = (CommandMenu)siblingIndex;
         }
         else if (ButtonGroupState.ActiveGroup == AbilityGroupButton || ButtonGroupState.ActiveGroup == ItemGroupButton)
         {
             _currentSubMenuIndex = go.GetComponent <RecycleListItem>().ItemDataIndex;
         }
         if (ButtonGroupState.ActiveGroup == TargetGroupButton)
         {
             if (go.transform.parent == modelButtonManager.transform)
             {
                 if (_cursorType == CursorGroup.Individual)
                 {
                     Int32 num   = go.GetComponent <ModelButton>().index;
                     Int32 index = num >= HonoluluBattleMain.EnemyStartIndex ? _matchBattleIdEnemyList.IndexOf(num) + 4 : _matchBattleIdPlayerList.IndexOf(num);
                     if (index != -1)
                     {
                         GONavigationButton targetHud = _targetPanel.AllTargets[index];
                         if (targetHud.ButtonGroup.enabled)
                         {
                             ButtonGroupState.ActiveButton = targetHud.GameObject;
                         }
                     }
                 }
             }
             else if (go.transform.parent.parent == TargetPanel.transform && _cursorType == CursorGroup.Individual)
             {
                 Int32 siblingIndex = go.transform.GetSiblingIndex();
                 if (go.GetParent().transform.GetSiblingIndex() == 1)
                 {
                     siblingIndex += HonoluluBattleMain.EnemyStartIndex;
                 }
                 if (_currentTargetIndex != siblingIndex)
                 {
                     _currentTargetIndex = siblingIndex;
                     DisplayTargetPointer();
                 }
             }
         }
     }
     return(true);
 }