Esempio n. 1
0
 private void DisplayGilAndItemInfo()
 {
     this.EXPAndAPPhrasePanel.SetActive(false);
     this.GilAndItemPhrasePanel.SetActive(true);
     this.receiveGilLabel.text = (this.gilValue.value - this.gilValue.current).ToString() + "[YSUB=1.3][sub]G";
     this.currentGilLabel.text = Mathf.Min(FF9StateSystem.Common.FF9.party.gil, 9999999f).ToString() + "[YSUB=1.3][sub]G";
     FF9UIDataTool.DisplayTextLocalize(this.infoLabelGameObject, "BattleResultInfoGilItem");
     if (this.itemList.Count > 0)
     {
         this.ItemDetailPanel.SetActive(true);
         this.noItemLabel.SetActive(false);
         Int32 num = 0;
         foreach (FF9ITEM ff9ITEM in this.itemList)
         {
             ItemListDetailWithIconHUD itemListDetailWithIconHUD = this.itemHudList[num];
             itemListDetailWithIconHUD.Self.SetActive(true);
             FF9UIDataTool.DisplayItem((Int32)ff9ITEM.id, itemListDetailWithIconHUD.IconSprite, itemListDetailWithIconHUD.NameLabel, true);
             itemListDetailWithIconHUD.NumberLabel.text = ff9ITEM.count.ToString();
             num++;
         }
     }
     else
     {
         this.ItemDetailPanel.SetActive(false);
         this.noItemLabel.SetActive(true);
     }
     if (this.defaultCard != 255)
     {
         this.ItemDetailPanel.SetActive(true);
         this.cardHud.Self.SetActive(true);
         this.cardHud.NameLabel.text = FF9TextTool.CardName(this.defaultCard);
     }
 }
Esempio n. 2
0
    private void DisplayCardDetail()
    {
        Int32 num = (Int32)this.count[this.currentCardId];

        if (num > 0)
        {
            this.cardInfoContentGameObject.SetActive(true);
            this.ShowCardDetailHudAmount(num);
            this.cardIdLabel.text = "No" + (this.currentCardId + 1).ToString("0#");
            FF9UIDataTool.DisplayCard(this.GetCardInfo(this.currentCardId, this.currentCardOffset), this.cardDetailHudList[0], false);
            this.cardNameLabel.text = FF9TextTool.CardName(this.currentCardId);
            if (num > 1)
            {
                this.cardNumberGameObject.SetActive(true);
                this.currentCardNumberLabel.text = (this.currentCardOffset + 1).ToString();
                this.totalCardNumberLabel.text   = num.ToString();
                for (Int32 i = 1; i < Math.Min(num, 5); i++)
                {
                    FF9UIDataTool.DisplayCard(this.GetCardInfo(this.currentCardId, 0), this.cardDetailHudList[i], true);
                }
            }
            else
            {
                this.cardNumberGameObject.SetActive(false);
            }
        }
        else
        {
            this.cardInfoContentGameObject.SetActive(false);
        }
    }
Esempio n. 3
0
    private void DisplayCardDetail()
    {
        Int32 num = (Int32)this.count[this.currentCardId];

        if (num > 0)
        {
            this.cardInfoContentGameObject.SetActive(true);
            this.ShowCardDetailHudNumber(num);
            FF9UIDataTool.DisplayCard(QuadMistDatabase.MiniGame_GetCardInfoPtr(this.currentCardId, this.offset[this.currentCardId]), this.cardDetailHudList[0], false);
            this.cardNameLabel.text = FF9TextTool.CardName(this.currentCardId);
            if (num > 1)
            {
                this.cardNumberGameObject.SetActive(true);
                this.currentCardNumberLabel.text = (this.offset[this.currentCardId] + 1).ToString();
                this.totalCardNumberLabel.text   = num.ToString();
                for (Int32 i = 1; i < Math.Min(num, 5); i++)
                {
                    FF9UIDataTool.DisplayCard(QuadMistDatabase.MiniGame_GetCardInfoPtr(this.currentCardId, 0), this.cardDetailHudList[i], true);
                }
            }
            else
            {
                this.cardNumberGameObject.SetActive(false);
            }
        }
        else
        {
            this.cardInfoContentGameObject.SetActive(false);
        }
    }
Esempio n. 4
0
    private static void LogDiscardingCard(QuadMistCard card)
    {
        String cardName    = FF9TextTool.CardName(card.id);
        String displayInfo = card.ToString();
        Int32  arrowCount  = MathEx.BitCount(card.arrow);

        Log.Message($"Discard the card: {cardName} ({displayInfo}, {arrowCount} arrows) [Id: {card.id}, Type: {card.type}, Attack: {card.atk}, P.Def: {card.pdef}, M.Def: {card.mdef}]");
    }
Esempio n. 5
0
    private IEnumerator ShowDialogWithCoroutine(Hand playerHand)
    {
        this.isReady = false;
        if (this.dialog != (UnityEngine.Object)null)
        {
            Singleton <DialogManager> .Instance.ReleaseDialogToPool(this.dialog);
        }
        String  text        = FF9TextTool.CardName((Int32)playerHand.SelectedUI.Data.id);
        UILabel dialogLabel = Singleton <DialogManager> .Instance.GetDialogLabel();

        Int32 oldWidth = dialogLabel.width;

        dialogLabel.width = Convert.ToInt32(UIManager.UIContentSize.x);
        dialogLabel.ProcessText();
        dialogLabel.UpdateNGUIText();
        Int32 width = Convert.ToInt32((NGUIText.CalculatePrintedSize2(text).x + Dialog.DialogPhraseXPadding * 2f) / UIManager.ResourceXMultipier) + 1;

        dialogLabel.width = oldWidth;
        this.dialog       = Singleton <DialogManager> .Instance.AttachDialog(String.Concat(new Object[]
        {
            "[STRT=",
            width,
            ",1][CENT][NANI][IMME]",
            text,
            "[TIME=-1]"
        }), 0, 1, Dialog.TailPosition.AutoPosition, Dialog.WindowStyle.WindowStylePlain, new Vector2(10000f, 10000f), Dialog.CaptionType.None);

        this.dialog.Panel.depth       -= 2;
        this.dialog.phrasePanel.depth -= 2;
        while (this.dialog.CurrentState != Dialog.State.CompleteAnimation)
        {
            yield return(new WaitForEndOfFrame());
        }
        Vector2       targetPosition = this.CalculateDialogTargetPosition(playerHand.Select, playerHand.Count);
        TweenPosition tweenPos       = this.dialog.GetComponent <TweenPosition>();

        if (tweenPos == (UnityEngine.Object)null)
        {
            tweenPos = this.dialog.gameObject.AddComponent <TweenPosition>();
        }
        tweenPos.ignoreTimeScale = false;
        tweenPos.from            = new Vector3(targetPosition.x + 800f, targetPosition.y);
        tweenPos.to = targetPosition;
        tweenPos.ResetToBeginning();
        tweenPos.duration       = 0.3f;
        tweenPos.enabled        = true;
        tweenPos.animationCurve = this.AnimationCurv;
        Single countDown = tweenPos.duration;

        while (countDown >= 0f)
        {
            countDown -= Time.deltaTime;
            yield return(new WaitForEndOfFrame());
        }
        UnityEngine.Object.Destroy(tweenPos);
        this.isReady = true;
        yield break;
    }
Esempio n. 6
0
 public static String GetItemName(Int32 index)
 {
     if (index < EventEngine.kSItemOfs)
     {
         return(FF9TextTool.ItemName(index));
     }
     if (index < EventEngine.kCItemOfs)
     {
         return(FF9TextTool.ImportantItemName(index - EventEngine.kSItemOfs));
     }
     return(FF9TextTool.CardName(index - EventEngine.kCItemOfs));
 }
Esempio n. 7
0
 public void SetTextID(Int32 id)
 {
     this.no.text       = "NO" + (id + 1);
     this.cardName.text = FF9TextTool.CardName(id);
 }