コード例 #1
0
        public void BindAllItems()
        {
            for (int i = 0; i < Inventory.Length; i++)
            {
                if (Inventory[i] == null)
                {
                    continue;
                }
                GameScene.Bind(Inventory[i]);
            }

            for (int i = 0; i < Equipment.Length; i++)
            {
                if (Equipment[i] == null)
                {
                    continue;
                }
                GameScene.Bind(Equipment[i]);
            }

            for (int i = 0; i < QuestInventory.Length; i++)
            {
                if (QuestInventory[i] == null)
                {
                    continue;
                }
                GameScene.Bind(QuestInventory[i]);
            }
        }
コード例 #2
0
        private void NewChatItem(S.NewChatItem p)
        {
            if (GameScene.ChatItemList.Any(x => x.UniqueID == p.Item.UniqueID))
            {
                return;
            }

            GameScene.Bind(p.Item);
            GameScene.ChatItemList.Add(p.Item);
        }
コード例 #3
0
        private void NewRecipeInfo(S.NewRecipeInfo info)
        {
            GameScene.RecipeInfoList.Add(info.Info);

            GameScene.Bind(info.Info.Item);

            for (int j = 0; j < info.Info.Ingredients.Count; j++)
            {
                GameScene.Bind(info.Info.Ingredients[j]);
            }
        }
コード例 #4
0
ファイル: ItemRentingDialog.cs プロジェクト: xiaoweb/mir2
        public void RefreshInterface()
        {
            _nameLabel.Text         = _guestName;
            _rentalPeriodLabel.Text = $"Rental Period: {GuestRentalPeriod} Days";

            if (GuestLoanItem != null)
            {
                GameScene.Bind(GuestLoanItem);
            }

            Redraw();
        }
コード例 #5
0
        public void RefreshInferface()
        {
            int offSet = Gender == MirGender.Male ? 0 : 1;

            CharacterPage.Index = 340 + offSet;

            switch (Class)
            {
            case MirClass.Warrior:
                ClassImage.Index = 100;    // + offSet * 5;
                break;

            case MirClass.Wizard:
                ClassImage.Index = 101;    // + offSet * 5;
                break;

            case MirClass.Taoist:
                ClassImage.Index = 102;    // + offSet * 5;
                break;

            case MirClass.Assassin:
                ClassImage.Index = 103;    // + offSet * 5;
                break;

            case MirClass.Archer:
                ClassImage.Index = 104;    // + offSet * 5;
                break;
            }

            NameLabel.Text  = Name;
            GuildLabel.Text = GuildName + " " + GuildRank;
            if (LoverName != "")
            {
                LoverButton.Visible = true;
                LoverButton.Hint    = LoverName;
            }
            else
            {
                LoverButton.Visible = false;
            }


            for (int i = 0; i < Items.Length; i++)
            {
                if (Items[i] == null)
                {
                    continue;
                }
                GameScene.Bind(Items[i]);
            }
        }
コード例 #6
0
ファイル: TradeDialogs.cs プロジェクト: Subordinater/Crystal
        public void RefreshInterface()
        {
            GuestNameLabel.Text = GuestName;
            GuestGoldLabel.Text = string.Format("{0:###,###,##0}", GuestGold);

            for (int i = 0; i < GuestItems.Length; i++)
            {
                if (GuestItems[i] == null)
                {
                    continue;
                }
                GameScene.Bind(GuestItems[i]);
            }

            Redraw();
        }
コード例 #7
0
ファイル: MaiModule.cs プロジェクト: wang35777/kkkgame
        private void ReceiveMail(S.ReceiveMail p)
        {
            NewMail        = false;
            NewMailCounter = 0;
            User.Mail.Clear();

            User.Mail = p.Mail.OrderByDescending(e => !e.Locked).ThenByDescending(e => e.DateSent).ToList();

            foreach (ClientMail mail in User.Mail)
            {
                foreach (UserItem itm in mail.Items)
                {
                    GameScene.Bind(itm);
                }
            }

            //display new mail received
            if (User.Mail.Any(e => e.Opened == false))
            {
                NewMail = true;
            }

            GameScene.Scene.MailListDialog.UpdateInterface();
        }