/// <summary>
 /// 受け取りボタン押下時
 /// </summary>
 private void OnClickReceiveButton(PresentBoxItem item)
 {
     //受け取り通信
     PresentApi.CallReceiveApi(
         new[] { item.server },
         this.OnReceiveSuccess,
         this.OnReceiveError
         );
 }
Exemplo n.º 2
0
    private void SetCommonUI()
    {
        this.lbDescription.text = this.prizeData.message;
        DateTime dateTime;

        if (DateTime.TryParse(this.prizeData.updateTime, out dateTime))
        {
            string str = dateTime.ToString("yyyy/MM/dd");
            this.lbLimitTime.text = StringMaster.GetString("OtherHistory-03") + str;
        }
        else
        {
            this.lbLimitTime.text = StringMaster.GetString("OtherHistory-03") + this.prizeData.updateTime.ToString();
        }
        PresentBoxItem component = base.gameObject.GetComponent <PresentBoxItem>();

        component.SetItem(this.prizeData.assetCategoryId, this.prizeData.assetValue, this.prizeData.assetNum, false, null);
    }
Exemplo n.º 3
0
    public IEnumerator SetDrops(bool isSkip = false, Action callBack = null)
    {
        this.index = 0;
        this.time  = 0f;
        this.isPlayIconAnimation = false;
        this.iconAnimationList   = new List <UIWidget>();
        if (!isSkip)
        {
            yield return(new WaitForSeconds(0.6f));
        }
        switch (this.data.dropType)
        {
        case GUIListDropItemParts.DropType.Luck:
            this.AddIconAnimationList(this.luckIcons);
            break;

        case GUIListDropItemParts.DropType.Owner:
            this.AddIconAnimationList(this.ownerRewardIcon);
            break;

        case GUIListDropItemParts.DropType.Multi:
            this.AddIconAnimationList(this.multiIcons);
            break;

        case GUIListDropItemParts.DropType.LuckMulti:
        {
            this.AddIconAnimationList(this.luckIcons);
            GUIListDropItemParts.LuckDropUserInfo luckDropUserInfo = this.GetLuckDropUserInfo(0, this.data.multiLuckDropUserId);
            if (luckDropUserInfo != null)
            {
                int             luckPlayerIcon = 0;
                MultiBattleData instance       = ClassSingleton <MultiBattleData> .Instance;
                string[]        array          = instance.MultiUsers.Select((MultiUser item) => item.userId).Distinct <string>().ToArray <string>();
                int             num            = (array == null) ? 0 : array.Length;
                for (int i = 0; i < num; i++)
                {
                    if (luckDropUserInfo.userId == array[i])
                    {
                        luckPlayerIcon = i;
                        break;
                    }
                }
                GameObject gameObject = this.goLuckPlayerIcons;
                BattleResultLuckPlayerIcon component = gameObject.GetComponent <BattleResultLuckPlayerIcon>();
                component.SetLuckPlayerIcon(luckPlayerIcon);
            }
            break;
        }

        case GUIListDropItemParts.DropType.Challenge:
            this.AddIconAnimationList(this.challengeIcon);
            break;

        case GUIListDropItemParts.DropType.EventChip:
            this.AddIconAnimationList(this.eventChipDropIcon);
            break;
        }
        PresentBoxItem presentBoxItem  = this.dropItemItems;
        int            assetCategoryId = (int)this.data.assetCategoryId;

        presentBoxItem.SetItem(assetCategoryId.ToString(), this.data.assetValue.ToString(), "1", false, null);
        this.dropItemItems.gameObject.SetActive(this.data.isEndOpenAnimation);
        this.dropNumLabel.text = "× " + this.data.assetNum;
        this.AddIconAnimationList(this.dropNumLabel);
        if (!isSkip)
        {
            yield return(new WaitForSeconds(0.1f));
        }
        if (callBack != null)
        {
            callBack();
        }
        yield break;
    }