internal void CheckIfAnyHasExpired(Inventory inv) { if (_expiresAmts.Count == 0 || !Program.IsFood) { return; } if (GameTime.IsPastOrNow(_expiresAmts[0].Expires)) { BulletinWindow.AddProduction(Key, _expiresAmts[0].Amt, "Expire"); if (inv.IsAStorage) { GameController.ResumenInventory1.GameInventory.RemoveByWeight(Key, _expiresAmts[0].Amt); } Amount -= _expiresAmts[0].Amt; if (Amount <= 0) { Amount = 0; inv.RemoveItem(Key); } _expiresAmts.RemoveAt(0); CheckIfAnyHasExpired(inv); } }
public void HidePersonBuildingOrderBulletin() { _personWindow.Hide(); _buildingWindow.Hide(); BulletinWindow.Hide(); _addOrderWindow.Hide(); }
/// <summary> /// Mian input method /// </summary> /// <param name="action"></param> public void DetectMouseClick(string action) { //print("DetectMouseClick() :" + type); if (action == "Outside") { //for when is clicked on Main menu gives NullRef if (_addOrderWindow == null) { return; } _addOrderWindow.Hide(); _buildingWindow.Hide(); BulletinWindow.Hide(); HelpWindow.Hide(); //try to select person first if (!SelectPerson()) { //if coulndt then try to select build if (!SelectClickedBuild()) { //if was not posible to seelct a building HidePersonBuildOrderNotiWindows(); var tryBuy = SelectSellRegion(); } } } else if (action != "") { ActionFromForm(action); } }
/// <summary> /// 初始化按钮 /// </summary> public void initButton(BulletinWindow _win, Bulletin _bulletin) { this.fatherWindow = _win; this.bulletin = _bulletin; fawin = _win; showUI(); }
public SubBulletinFinance(BulletinWindow bulletinWindow) { _bulletinWindow = bulletinWindow; if (_financeLogger == null) { _financeLogger = new FinanceLogger(true); } }
public bool IsAWindowScrollableShownNow() { if (_buildingsMenu == null) { return(false); } return(_addOrderWindow.IsShownNow() || BulletinWindow.IsShownNow() || //|| _notificationWindow.IsShownNow() QuestWindow.IsShownNow() || _helpWindow.IsShownNow() || MouseOnWindowNow); }
public bool IsAWindowShownNow() { if (_buildingsMenu == null) { return(false); } return(_buildingsMenu.IsShownNow() || _descriptionWindow.IsShownNow() || _personWindow.IsShownNow() || _buildingWindow.IsShownNow() || _addOrderWindow.IsShownNow() || BulletinWindow.IsShownNow() || QuestWindow.IsShownNow() || _helpWindow.IsShownNow()); }
public void HidePersonBuildOrderNotiBulletinHelpWin() { HidePersonBuildOrderNotiWindows(); _buildingsMenu.Hide(); _descriptionWindow.Hide(); _buildingWindow.Hide(); BulletinWindow.Hide(); _helpWindow.Hide(); QuestWindow.Hide(); }
public SubBulletinProduction(BulletinWindow bulletinWindow) { _bulletinWindow = bulletinWindow; }
internal void ClickOnAnInvItem(InvItem _invItem) { HidePersonBuildOrderNotiWindows(); BulletinWindow.Show(); BulletinWindow.ShowSpecs(); }
public SubBulletinGeneral(BulletinWindow win) { _bulletinWindow = win; }