Exemplo n.º 1
0
 public void SetRewardItem(int buildtype, int num)
 {
     m_iItemID = buildtype;
     sdata.s_itemtypeInfo Info = ItemM.GetItemInfo(m_iItemID);
     if (Info == null)
     {
         Debug.Log("不存在该物品:" + buildtype);
     }
     else
     {
         int quality = ConfigM.GetBigQuality(Info.quality);
         SetHead(Info.gtype, Info.icon, Info.gid);
         if (MyHead.SprQuality != null)
         {
             MyHead.SprQuality.spriteName = quality.ToString();
         }
         if (MyHead.NumLabel != null)
         {
             if (num > 0)
             {
                 MyHead.NumLabel.text = num.ToString();
             }
             else
             {
                 MyHead.NumLabel.text = "";
             }
         }
     }
 }
Exemplo n.º 2
0
    void ClickDown(Vector3 pos)
    {
        sdata.s_itemtypeInfo Info = ItemM.GetItemInfo(m_iItemID);
        if (Info != null)
        {
            string Name        = Info.name;
            int    Level       = Info.level;
            string Description = Info.title.Replace("\\n", System.Environment.NewLine);
            int    Money       = Info.money;
            int    HaveCount   = ItemDC.GetItemCount(m_iItemID);

            m_wnd = WndManager.GetDialog <StageTipWnd>();
            if (Info.gtype == 0)
            {
                m_wnd.SetTipData(pos, StageClickType.Item, Info.icon, Info.quality, Name, Level, Description, HaveCount, Money, Info.gtype);
            }
            else if (Info.gtype == 1)
            {
                m_wnd.SetTipData(pos, StageClickType.Item, Info.gid, Info.quality, Name, Level, Description, HaveCount, Money, Info.gtype);
            }
            if (Info.gtype == 2)
            {
                m_wnd.SetTipData(pos, StageClickType.Item, Info.gid, Info.quality, Name, Level, Description, HaveCount, Money, Info.gtype);
            }
            if (Info.gtype == 3)
            {
                m_wnd.SetTipData(pos, StageClickType.Item, Info.gid, Info.quality, Name, Level, Description, HaveCount, Money, Info.gtype);
            }
        }
    }
Exemplo n.º 3
0
    /// <summary>
    /// 显示船只设计图
    /// </summary>
    public void ShowDesignAction()
    {
        treasure.TreasureRobSettleResponse response = null;
        if (response != null)
        {
            int sShipCanvasID      = response.shipdrawingid;
            StaticShipCanvas sInfo = ShipPlanM.GetShipCanvasInfo(sShipCanvasID);
            if (sInfo != null)
            {
                sdata.s_itemtypeInfo itypeInfo = new sdata.s_itemtypeInfo();
                itypeInfo.gid   = sShipCanvasID;
                itypeInfo.name  = sInfo.Name;
                itypeInfo.gtype = 5;
                List <sdata.s_itemtypeInfo> lInfo = new List <sdata.s_itemtypeInfo>();
                lInfo.Add(itypeInfo);

                TrophiesActionWnd TropWnd = WndManager.GetDialog <TrophiesActionWnd>();
                if (TropWnd)
                {
                    TropWnd.ClearTropiesData();
                    TropWnd.AddTropiesData(lInfo);
                    TropWnd.SetWndType(5);
                    TropWnd.MyHead.LblDes.gameObject.SetActive(false);
                    TropWnd.BtnOKClickHandler += CheckShowCombatResult;
                }
            }
            else
            {
                CheckShowCombatResult();
            }
        }
        else
        {
            CheckShowCombatResult();
        }
    }