protected override void OnActivateScene(object parameter) { inventory.SetGroup(BurntimeClassic.Instance.SelectedCharacter); restaurantText = null; drinkLastAmount = -1; grid.Clear(); }
private void RefreshItems() { itemCount[0] = -1; itemCount[1] = -1; grid.Clear(); int count = 0; foreach (KeyValuePair <string, int> item in items) { if (count < offset) { count++; continue; } Item it = new Item(); it.Type = BurntimeClassic.Instance.Game.ItemTypes[item.Key]; itemCount[count - offset] = item.Value; grid.Add(it); count++; if (count - offset == 2) { break; } } }
void OnButtonHeal() { int value = grid.GetHealValue(); BurntimeClassic classic = app as BurntimeClassic; inventory.ActiveCharacter.Health += value; UpdateText(); classic.Game.World.ActivePlayerObj.Character.Items.Remove(grid); grid.Clear(); }
protected override void OnActivateScene(object parameter) { BurntimeClassic classic = app as BurntimeClassic; inventory.SetGroup(BurntimeClassic.Instance.SelectedCharacter); Background = classic.InventoryBackground == 22 ? "wirt.pac" : "koch.pac"; restaurantText = null; Windows.Remove(ani); if (classic.InventoryBackground != 22) { ani = new Image(app); ani.Position = new Vector2(186, 50); ani.Background = "koch.ani??p"; ani.Background.Animation.Speed = 6.5f; ani.Background.Animation.Progressive = false; Windows += ani; } eatLastAmount = -1; grid.Clear(); }
protected override void OnActivateScene(object parameter) { BurntimeClassic classic = app as BurntimeClassic; inventory.SetGroup(classic.SelectedCharacter); inventoryTrader.SetGroup(classic.Game.World.ActiveTraderObj); exchangeTop.Title = classic.Game.World.ActiveTraderObj.Name; exchangeTop.ExchangeResult = ExchangeResult.Ng; exchangeBottom.Title = classic.Game.World.ActivePlayerObj.Name; exchangeBottom.ExchangeResult = ExchangeResult.None; temporarySpace.Clear(); side = InventorySide.None; }
void dialog_WindowHide(object sender, EventArgs e) { if (dialog.Result == ConversationActionType.Yes) { BurntimeClassic classic = app as BurntimeClassic; IItemCollection right = (classic.InventoryRoom == null) ? (IItemCollection)classic.PickItems : classic.InventoryRoom.Items; classic.Game.Constructions.Construct(construction, inventory.ActiveCharacter, right, item, classic.Game); inventory.OnSelectPage(); // grid is not available if inventory is shown while on main map if (grid != null) { grid.Clear(); grid.Add(right); } } }