/*public GameViewModel(GameServiceReference.Game game, int userId) * { * _game = game; * _userId = userId; * Init(); * }*/ public GameViewModel() { BottomMenu = new BottomMenu(); CenterView = new CenterView { DataContext = this }; /*Players = new ObservableCollection<Player> * { * new Player * { * Name = "Петя", * CardsCount = 3, * GoldCount = 4 * }, * new Player * { * Name = "Вася", * CardsCount = 4, * GoldCount = 7 * }, * new Player * { * Name = "Дима", * CardsCount = 1, * GoldCount = 2 * }, * new Player * { * Name = "Женя", * CardsCount = 5, * GoldCount = 2 * }, * };*/ }
private void SubscribeBackButtonClick(BottomMenu bottomMenu) { if (!CanClose) { return; } switch (State.Value) { case StateType.SelectMenu: Close(); Game.Event.OnRoomEnter.Invoke(true); break; case StateType.CombinationConfirm: State.SetValueAndForceNotify(selectedRecipe.ItemSubType == ItemSubType.Food ? StateType.CombineConsumable : StateType.CombineEquipment); break; default: Animator.Play("CloseLeftArea"); break; } }
//1 購入ボタン 2 アドオン 3 装備 public void SetMode(BottomMenu menu) { switch (menu) { case BottomMenu.Buy: PSGameUtils.ActiveNGUIObject(bottomBuyBtns, true); PSGameUtils.ActiveNGUIObject(bottomAddons, false); PSGameUtils.ActiveNGUIObject(bottomEquipped, false); PSGameUtils.ActiveNGUIObject(bottomEquipBtn, false); break; case BottomMenu.AddOn: PSGameUtils.ActiveNGUIObject(bottomBuyBtns, false); PSGameUtils.ActiveNGUIObject(bottomAddons, true); PSGameUtils.ActiveNGUIObject(bottomEquipped, false); PSGameUtils.ActiveNGUIObject(bottomEquipBtn, false); break; case BottomMenu.Equip: PSGameUtils.ActiveNGUIObject(bottomBuyBtns, false); PSGameUtils.ActiveNGUIObject(bottomAddons, false); PSGameUtils.ActiveNGUIObject(bottomEquipped, true); PSGameUtils.ActiveNGUIObject(bottomEquipBtn, false); break; case BottomMenu.Btn: PSGameUtils.ActiveNGUIObject(bottomBuyBtns, false); PSGameUtils.ActiveNGUIObject(bottomAddons, false); PSGameUtils.ActiveNGUIObject(bottomEquipped, false); PSGameUtils.ActiveNGUIObject(bottomEquipBtn, true); break; } }
private void SubscribeOnExitButtonClick(BottomMenu bottomMenu) { if (!CanClose) { return; } var stage = Game.Game.instance.Stage; if (stage.isExitReserved) { stage.isExitReserved = false; bottomMenu.exitButton.Toggleable = false; bottomMenu.exitButton.IsWidgetControllable = false; bottomMenu.exitButton.SharedModel.IsEnabled.Value = false; bottomMenu.exitButton.SetToggledOff(); } else { bottomMenu.exitButton.Toggleable = true; bottomMenu.exitButton.IsWidgetControllable = true; var confirm = Find <Confirm>(); confirm.Show("UI_BATTLE_EXIT_RESERVATION_TITLE", "UI_BATTLE_EXIT_RESERVATION_CONTENT"); confirm.CloseCallback = result => { if (result == ConfirmResult.Yes) { stage.isExitReserved = true; bottomMenu.exitButton.SharedModel.IsEnabled.Value = true; repeatButton.SetToggledOff(); } }; } }
private void SubscribeBackButtonClick(BottomMenu bottomMenu) { var stageInfo = Find <UI.StageInformation>(); stageInfo.Close(); Game.Event.OnRoomEnter.Invoke(true); }
void ReleaseDesignerOutlets() { if (BottomMenu != null) { BottomMenu.Dispose(); BottomMenu = null; } if (btnComments != null) { btnComments.Dispose(); btnComments = null; } if (btnRates != null) { btnRates.Dispose(); btnRates = null; } if (btnStatistic != null) { btnStatistic.Dispose(); btnStatistic = null; } if (MainBackground != null) { MainBackground.Dispose(); MainBackground = null; } if (NavigationBar != null) { NavigationBar.Dispose(); NavigationBar = null; } }
private void SubscribeBackButtonClick(BottomMenu bottomMenu) { if (!CanClose) { return; } Close(true); Game.Event.OnRoomEnter.Invoke(true); }
public void Init() { Window = new GameUI { DataContext = this }; BottomMenu = new BottomMenu { DataContext = this }; Window.Show(); }
public Evolutio() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; Player = new Player { World = World, Evolutio = this }; _gameRenderer = new GameRenderer { World = World, Player = Player }; BottomMenu = new BottomMenu { Evolutio = this }; behaviors.Add(BottomMenu); behaviors.Add(Player); }
void ReleaseDesignerOutlets() { if (BottomMenu != null) { BottomMenu.Dispose(); BottomMenu = null; } if (btnComments != null) { btnComments.Dispose(); btnComments = null; } if (btnRates != null) { btnRates.Dispose(); btnRates = null; } if (btnStatistic != null) { btnStatistic.Dispose(); btnStatistic = null; } if (MainBackground != null) { MainBackground.Dispose(); MainBackground = null; } if (MainLabel != null) { MainLabel.Dispose(); MainLabel = null; } if (OverlayView != null) { OverlayView.Dispose(); OverlayView = null; } }
void Awake() { S = this; }
void ReleaseDesignerOutlets() { if (GeenSites != null) { GeenSites.Dispose(); GeenSites = null; } if (ActivityIndicator != null) { ActivityIndicator.Dispose(); ActivityIndicator = null; } if (BottomMenu != null) { BottomMenu.Dispose(); BottomMenu = null; } if (CancelButton != null) { CancelButton.Dispose(); CancelButton = null; } if (DarkBackground != null) { DarkBackground.Dispose(); DarkBackground = null; } if (OKButton != null) { OKButton.Dispose(); OKButton = null; } if (RegistrationExplanation != null) { RegistrationExplanation.Dispose(); RegistrationExplanation = null; } if (TableView != null) { TableView.Dispose(); TableView = null; } if (ToevoegenButton != null) { ToevoegenButton.Dispose(); ToevoegenButton = null; } if (TopMenu != null) { TopMenu.Dispose(); TopMenu = null; } }
// Methods public static void StartMenuManager() { bottomMenu = GameObject.Find("Gui/BottomMenu").GetComponent <BottomMenu>(); }
void ReleaseDesignerOutlets() { if (BottomMenu != null) { BottomMenu.Dispose(); BottomMenu = null; } if (btnAll != null) { btnAll.Dispose(); btnAll = null; } if (btnComments != null) { btnComments.Dispose(); btnComments = null; } if (btnCost != null) { btnCost.Dispose(); btnCost = null; } if (btnHalfYear != null) { btnHalfYear.Dispose(); btnHalfYear = null; } if (btnMonth != null) { btnMonth.Dispose(); btnMonth = null; } if (btnQuality != null) { btnQuality.Dispose(); btnQuality = null; } if (btnQuarter != null) { btnQuarter.Dispose(); btnQuarter = null; } if (btnRates != null) { btnRates.Dispose(); btnRates = null; } if (btnService != null) { btnService.Dispose(); btnService = null; } if (btnStatistic != null) { btnStatistic.Dispose(); btnStatistic = null; } if (btnYear != null) { btnYear.Dispose(); btnYear = null; } if (GraphicViewWindow != null) { GraphicViewWindow.Dispose(); GraphicViewWindow = null; } if (MainBackGroubd != null) { MainBackGroubd.Dispose(); MainBackGroubd = null; } if (ServiceWindow != null) { ServiceWindow.Dispose(); ServiceWindow = null; } if (TopMenuView != null) { TopMenuView.Dispose(); TopMenuView = null; } }