コード例 #1
0
 public void Init(SellEntity sellEntity)
 {
     sellRuneItem             = sellEntity.info;
     sellEvent                = sellEntity.sellEvent;
     this.itfd_sellcount.text = sellcount.ToString();
     this.txt_name.text       = sellRuneItem.nane;
     this.txt_attribute.text  = sellRuneItem.itemattribute;
     this.txt_describer.text  = sellRuneItem.describer;
     this.txt_count.text      = string.Format(HAVE_COUNT, sellRuneItem.count);
     GameResourceLoadManager.GetInstance().LoadAtlasSprite(sellRuneItem.iconid, delegate(string name, AtlasSprite atlasSprite, System.Object param)
     {
         this.img_icon.SetSprite(atlasSprite);
     }, true);
     this.txt_getgold.text = (sellcount * sellRuneItem.sellprice_gold).ToString();
 }
コード例 #2
0
ファイル: RuneMainView.cs プロジェクト: liushengchao112/Ember
        private void OnClickRuneSellButton()
        {
            SellEntity sellEntity = new SellEntity();

            sellEntity.info                = new RuneInfo();
            sellEntity.info.runeid         = currentRuneId;
            sellEntity.info.level          = controller.GetRuneLevel(currentRuneId);
            sellEntity.info.iconid         = controller.GetRuneIcon(currentRuneId);
            sellEntity.info.count          = controller.GetRuneNumber(currentRuneId);
            sellEntity.info.nane           = controller.GetRuneName(currentRuneId);
            sellEntity.info.itemattribute  = controller.GetRuneAttribute(currentRuneId);
            sellEntity.info.describer      = controller.GetRuneIntrotuce(currentRuneId);
            sellEntity.info.sellprice_gold = controller.GetItemProto(currentRuneId).Price;
            sellEntity.sellEvent           = (int count, int id) =>
            {
                controller.SendSellRune(count, currentRuneId);
            };
            ShowRunePopViewUI(sellEntity, RunePopType.RuneSellUI);
        }