private void RefreshUI_drawLine(List <List <SItemData> > s, UISprite sp)
 {
     if (s == null)
     {
         return;
     }
     for (int i = 0; i < s.Count; i++)
     {
         if (s[i] != null && s[i].Count != 0)
         {
             float num  = -999999f;
             float num2 = 999999f;
             for (int j = 0; j < s[i].Count; j++)
             {
                 SItemData sItemData = s[i][j];
                 if (sItemData != null)
                 {
                     ColumnType level = sItemData.Level;
                     string     iD    = sItemData.ID;
                     if (this.dicSItemCom.ContainsKey(level))
                     {
                         if (this.dicSItemCom[level].ContainsKey(iD))
                         {
                             BattleEquip_ShopItem2 battleEquip_ShopItem = this.dicSItemCom[level][iD];
                             num  = Mathf.Max(battleEquip_ShopItem.PosY, num);
                             num2 = Mathf.Min(battleEquip_ShopItem.PosY, num2);
                         }
                     }
                 }
             }
             this.RefreshUI_drawLine(sp, num, num2, i);
         }
     }
 }
예제 #2
0
        private void OnMsg_BattleShop_clickBuy(MobaMessage msg)
        {
            ShopInfo  curShopInfo          = ModelManager.Instance.Get_BattleShop_openShop();
            SItemData sItem                = ModelManager.Instance.Get_BattleShop_curSItem();
            MsgData_BattleShop_buy buyInfo = new MsgData_BattleShop_buy(sItem, BuyingEquipType.eShop, curShopInfo);

            this.DoBuy(buyInfo);
        }
예제 #3
0
 void OnEnable()
 {
     for (int i = 0; i < 100; i++)
     {
         SItemData sItem = _pRandomItemTable.GetRandomItem();
         Debug.Log(string.Format("당첨!! 확률{0}%로 {1}당첨!", sItem.iPercent, sItem.strName));
     }
 }
예제 #4
0
 public MsgData_BattleShop_buy(SItemData sItem, BuyingEquipType type, ShopInfo curShopInfo)
 {
     this.rItem   = null;
     this.sItem   = sItem;
     this.buyType = type;
     this.curShop = curShopInfo;
     this.CheckValid();
 }
        private void InitData()
        {
            this.curPosseessItem = ModelManager.Instance.Get_BattleShop_curPItem();
            this.curShopItem     = ModelManager.Instance.Get_BattleShop_curSItem();
            this.tItem           = ModelManager.Instance.Get_BattleShop_curTItem();
            this.wallet          = ModelManager.Instance.Get_BattleShop_money();
            this.playerAlive     = ModelManager.Instance.Get_BattleShop_playerAlive();
            ShopInfo shopInfo = ModelManager.Instance.Get_BattleShop_openShop();

            this.brawlCanBuy = ModelManager.Instance.Get_BattleShop_brawlCanBuy();
            if (shopInfo != null)
            {
                this.withDistance = shopInfo.InArea;
                this.dealCounter  = shopInfo.DealCounter;
                this.shopState    = shopInfo.State;
            }
        }
예제 #6
0
    void OnEnable()
    {
        Debug.LogWarning("아이템은 17개 넣었는데, 뽑기 요청은 20개를 하여 for문 한번 돌때마다 3번씩 아이템이 없다 뜰것입니다");

        for (int i = 0; i < 20; i++)
        {
            SItemData sItem = _pRandomItemTable.GetRandomItem();

            if (sItem == null)
            {
                Debug.Log("아이템이 없다..");
            }
            else
            {
                Debug.Log(string.Format("당첨!! 확률{0}%로 {1}획득!", sItem.iPercent, sItem.strName));
            }
        }


        _pRandomItemTable.DoReset_OnDeleteMode();
        Debug.LogWarning("리셋!!");

        for (int i = 0; i < 20; i++)
        {
            SItemData sItem = _pRandomItemTable.GetRandomItem();

            if (sItem == null)
            {
                Debug.Log("아이템이 없다..");
            }
            else
            {
                Debug.Log(string.Format("당첨!! 확률{0}%로 {1}획득!", sItem.iPercent, sItem.strName));
            }
        }
    }
 private void OnMsg_BattleShop_curShopItemChanged(MobaMessage msg)
 {
     this.curShopItem = (msg.Param as SItemData);
     this.RefreshUI_btnBuy();
 }
 private void OnDoubleClickItem(SItemData item)
 {
     MobaMessageManagerTools.SendClientMsg(ClientV2C.BattleShop_DClickSItem, item, false);
 }
 private void OnMsg_BattleShop_curShopItemRouteChanged(MobaMessage msg)
 {
     this.CurSRItem = (msg.Param as SItemData);
     this.RefreshUI_itemCom();
     this.RefreshUI_route();
 }