Ejemplo n.º 1
0
 private void SetTitle(bool dragonEnable, int dragonQuality)
 {
     if (dragonEnable || dragonQuality == TheLastDragonQuality)
     {
         m_lblChooseDragonUIGridTitleName.text        = DragonQualityData.GetDragonQualityData(dragonQuality).GetName(true);
         m_lblChooseDragonUIGridTitleName.effectStyle = UILabel.Effect.Outline;
         m_lblChooseDragonUIGridTitleName.effectColor = new Color32(53, 22, 2, 255);
         m_lblChooseDragonUIGridTitleName.color       = new Color32(255, 255, 255, 255);
     }
     else
     {
         m_lblChooseDragonUIGridTitleName.text        = DragonQualityData.GetDragonQualityData(dragonQuality).GetName(false);
         m_lblChooseDragonUIGridTitleName.effectStyle = UILabel.Effect.None;
         m_lblChooseDragonUIGridTitleName.color       = new Color32(63, 27, 4, 255);
     }
 }
Ejemplo n.º 2
0
    public void OnSelectOtherPlayer(int index)
    {
        Debug.Log("OnSelectOtherPlayer:" + index);

        //显示tip
        DragonMatchPlayerInfo playUIInfo = new DragonMatchPlayerInfo();
        DragonPlayerInfo      info       = m_currentData.playerList[index];

        playUIInfo.dragon = DragonQualityData.GetDragonQualityData(info.quality).GetName(true);
        int exp  = 0;
        int gold = 0;

        if (info.reward.ContainsKey(2))
        {
            gold = info.reward[2];
        }
        if (info.reward.ContainsKey(1))
        {
            exp = info.reward[1];
        }
        playUIInfo.hitObtainGold = gold.ToString() + ItemParentData.GetItem(2).Name;
        playUIInfo.hitObtainExp  = exp.ToString() + ItemParentData.GetItem(1).Name;

        playUIInfo.hitTimes = string.Concat(info.hittedTime, "/", DragonBaseData.dataMap[1].convoyAttackedTimes);
        playUIInfo.level    = "LV" + info.level.ToString();
        playUIInfo.power    = info.power.ToString();
        playUIInfo.status   = info.GetStatusInfo();
        playUIInfo.tong     = info.tongName;
        playUIInfo.name     = info.name;
        bool showBtn = (info.dbid != MogoWorld.thePlayer.dbid) && (info.hittedTime < DragonBaseData.dataMap[1].convoyAttackedTimes);

        DragonMatchUIViewManager.Instance.ShowDragonMatchPlayerInfoUIBtnHit(showBtn);
        DragonMatchUIViewManager.Instance.SetDragonMatchPlayerInfo(playUIInfo);
        DragonMatchUIViewManager.Instance.ShowDragonMatchPlayerInfoUI(true);
        m_selectedPlayer = index;
    }
Ejemplo n.º 3
0
    public string GetInfo()
    {
        int contentId            = DragonEventDescData.dataMap.Get(type).desc;
        DragonQualityData dragon = DragonQualityData.GetDragonQualityData(quality);

        int exp  = 0;
        int gold = 0;

        if (reward.ContainsKey(2))
        {
            gold = reward[2];
        }
        if (reward.ContainsKey(1))
        {
            exp = reward[1];
        }
        string msg = LanguageData.GetContent(contentId);

        Debug.Log("msg:" + msg);
        Debug.Log("type:" + type);

        DateTime dtStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));

        dtStart = dtStart.AddSeconds(timeStamp);

        if (type == 1)
        {
            msg = string.Format(msg, dtStart.ToString("[yyyy-MM-dd HH:mm]"), dragon.GetName(true), gold, exp);
        }
        else
        {
            msg = string.Format(msg, dtStart.ToString("[yyyy-MM-dd HH:mm]"), name, dragon.GetName(true), gold, exp);
        }
        Debug.Log(msg);
        return(msg);
    }
Ejemplo n.º 4
0
    private void SetupChooseDragonView()
    {
        //Debug.Log("SetupChooseDragonView");
        List <ChooseDragonGridData> chooseDragonGridDataList = new List <ChooseDragonGridData>();
        List <DragonQualityData>    dragonDataList           = DragonQualityData.GetDataList();

        for (int i = 0; i < dragonDataList.Count; i++)
        {
            ChooseDragonGridData gridData = new ChooseDragonGridData();
            gridData.dragonID      = dragonDataList[i].id;
            gridData.dragonQuality = dragonDataList[i].quality;
            if (dragonDataList[i].quality != m_currentData.dragonQuality)
            {
                gridData.enable = false;
            }
            else
            {
                gridData.enable = true;
            }

            gridData.finishTime     = LanguageData.dataMap.Get(26300).Format((dragonDataList[i].convoyCompleteTime[m_currentData.currentRound + 1] / 60));
            gridData.additionReward = LanguageData.GetContent(26301, (dragonDataList[i].rewardAddition / 100));
            if (i == 4 && m_currentData.dragonQuality != 6)
            {
                gridData.showBuy = true;
            }
            else
            {
                gridData.showBuy = false;
            }
            chooseDragonGridDataList.Add(gridData);
        }
        ChooseDragonUILogicManager.Instance.SetChooseDragonGridDataList(chooseDragonGridDataList);

        DragonQualityData currentDragon  = DragonQualityData.GetDragonQualityData(m_currentData.dragonQuality);
        string            nextDragonName = string.Empty;

        if (m_currentData.dragonQuality < 6)
        {
            nextDragonName = DragonQualityData.GetDragonQualityData(m_currentData.dragonQuality + 1).GetName(true);
        }
        ChooseDragonUIViewManager.Instance.SetCurrentChooseDragon(currentDragon.GetName(true), nextDragonName);
        ChooseDragonUIViewManager.Instance.SetRewardCurrentTime(m_currentData.currentRound + 1);

        ChooseDragonUIViewManager.Instance.SetRewardExp(Rewards[1]);
        ChooseDragonUIViewManager.Instance.SetRewardGold(Rewards[2]);
        int[]  cost        = DragonBaseData.GetCostItem();
        int    costNum     = cost[1];
        int    costID      = cost[0];
        int    materialNum = InventoryManager.Instance.GetItemNumById(costID);
        string costStr     = string.Empty;

        if (costNum <= materialNum)
        {
            ChooseDragonUIViewManager.Instance.SetUpgradeNeedIcon(ItemParentData.GetItem(costID).Icon);
            costStr = string.Concat(costNum, "/", materialNum);
            ChooseDragonUIViewManager.Instance.SetUpgradeNeedNum(costStr);
        }
        else
        {
            int priceId = DragonBaseData.dataMap[1].upgradeQualityCost;
            int price   = PriceListData.GetPrice(priceId, 0);

            costStr = string.Concat(price, "/", MogoWorld.thePlayer.diamond);
            if (price > MogoWorld.thePlayer.diamond)
            {
                costStr = MogoUtils.GetRedString(costStr);
            }
            ChooseDragonUIViewManager.Instance.SetUpgradeNeedIcon(ItemParentData.GetItem(3).Icon);
            ChooseDragonUIViewManager.Instance.SetUpgradeNeedNum(costStr);
        }
    }