Esempio n. 1
0
 private void onDiscardConfirmHidden(Int32 choice)
 {
     ButtonGroupState.SetPointerOffsetToGroup(Dialog.DefaultOffset, Dialog.DialogGroupButton);
     if (choice == 0)
     {
         QuadMistDatabase.MiniGame_AwayCard(this.deleteCardId, this.currentCardOffset);
         if (QuadMistDatabase.MiniGame_GetAllCardCount() > 100)
         {
             QuadMistUI.allCardList.Remove(this.GetCardInfo(this.currentCardId, this.currentCardOffset));
             Byte[] array = this.count;
             Int32  num   = this.deleteCardId;
             array[num]             = (Byte)(array[num] - 1);
             this.currentCardOffset = 0;
             this.DisplayCardList();
             this.DisplayCardDetail();
             ButtonGroupState.ActiveGroup = QuadMistUI.CardGroupButton;
             this.UpdateAmountLabel();
         }
         else
         {
             this.Hide(delegate
             {
                 QuadMistGame.OnDiscardFinish();
                 this.isNeedToBuildCard = true;
             });
         }
     }
     else
     {
         ButtonGroupState.ActiveGroup = QuadMistUI.CardGroupButton;
     }
 }
Esempio n. 2
0
    private void OnGUI()
    {
        Rect fullscreenRect = DebugGuiSkin.GetFullscreenRect();

        DebugGuiSkin.ApplySkin();
        if (QuadMistDebugGui.isShowPreGameDebugMenu)
        {
            GUILayout.BeginArea(fullscreenRect);
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            GUILayout.FlexibleSpace();
            GUILayout.BeginVertical(new GUILayoutOption[0]);
            GUILayout.FlexibleSpace();
            GUILayout.BeginVertical("box", new GUILayoutOption[0]);
            if (GUILayout.Button("Play game with your NOOB cards", new GUILayoutOption[0]))
            {
                QuadMistGame.OnFinishSelectCardUI(null);
                QuadMistDebugGui.isShowPreGameDebugMenu = false;
            }
            GUILayout.EndVertical();
            GUILayout.FlexibleSpace();
            GUILayout.EndVertical();
            GUILayout.FlexibleSpace();
            GUILayout.EndHorizontal();
            GUILayout.EndArea();
        }
    }
Esempio n. 3
0
    private void SelectCard(Int32 id, Int32 offset)
    {
        QuadMistCard cardInfo = this.GetCardInfo(id, offset);

        this.selectedCardList.Add(cardInfo);
        QuadMistUI.allCardList.Remove(cardInfo);
        Byte[] array = this.count;
        array[id] = (Byte)(array[id] - 1);
        QuadMistGame.UpdateSelectedCardList(this.selectedCardList);
        this.DisplayCardList();
    }
Esempio n. 4
0
    private void DeselectCard(Int32 index)
    {
        QuadMistCard quadMistCard = this.selectedCardList[index];

        this.selectedCardList.Remove(quadMistCard);
        QuadMistUI.allCardList.Add(quadMistCard);
        Byte[] array = this.count;
        Byte   id    = quadMistCard.id;

        array[(Int32)id] = (Byte)(array[(Int32)id] + 1);
        QuadMistGame.UpdateSelectedCardList(this.selectedCardList);
        this.DisplayCardList();
    }
Esempio n. 5
0
    private void OnClickSelectedCard(GameObject go)
    {
        Int32 siblingIndex = go.transform.GetSiblingIndex();

        if (siblingIndex < this.selectedCardList.Count)
        {
            FF9Sfx.FF9SFX_Play(101);
            QuadMistCard quadMistCard = this.selectedCardList[siblingIndex];
            this.selectedCardList.RemoveAt(siblingIndex);
            QuadMistUI.allCardList.Add(quadMistCard);
            Byte[] array = this.count;
            Byte   id    = quadMistCard.id;
            array[(Int32)id] = (Byte)(array[(Int32)id] + 1);
            QuadMistGame.UpdateSelectedCardList(this.selectedCardList);
            this.DisplayCardList();
            this.DisplayCardDetail();
        }
    }
Esempio n. 6
0
 private void onConfirmDialogHidden(Int32 choice)
 {
     ButtonGroupState.SetPointerOffsetToGroup(Dialog.DefaultOffset, Dialog.DialogGroupButton);
     if (choice == 0)
     {
         this.Hide(delegate
         {
             QuadMistGame.OnFinishSelectCardUI(this.selectedCardList);
             this.isNeedToBuildCard = true;
         });
     }
     else
     {
         this.DeselectCard(4);
         this.currentCardOffset = 0;
         this.cardInfoContentGameObject.SetActive(true);
         this.DisplayCardList();
         this.DisplayCardDetail();
         ButtonGroupState.ActiveGroup = QuadMistUI.CardGroupButton;
     }
 }