public Result Start() { StartGameAction gameAction = new StartGameAction(); GoFishGame game = _gameAccessor.Game; Result result = _gameManager.PerformAction(gameAction, ref game); return(result); }
public void StartGame() { playerHealth = startPlayerHealth; PlayStatus = EnPlayStatus.None; LevelStatus = EnLevelStatus.Playing; StartGameAction?.Invoke(); }
void onClick() { Debug.Log("tapping"); if (startButtonPress) { Debug.Log("trying to invoke game start action"); StartGameAction?.Invoke(); } else if (quitButtonPress) { Application.Quit(); } }
private void ConfirmDeck() { Client.Instance.Proxy.OnSendBuildInfo(CurrentEditBuildButton.BuildInfo); NoticeManager.Instance.ShowInfoPanelCenter(LanguageManager.Instance.GetText("Notice_SelectBuildManagerSelect_UpdateDeckSuccess"), 0, 1f); if (CurrentSelectedBuildButton) { CurrentSelectedBuildButton.IsSelected = false; } CurrentSelectedBuildButton = CurrentEditBuildButton; CurrentSelectedBuildButton.IsSelected = true; CloseUIForm(); StartGameAction?.Invoke(); }
void SetShip(Point point) { currentShip.AddPoint(point); SetEnabledPoints(currentShip); if (currentShip.Initialized) { if (currentShip.IsVertical) { var top = Buttons.First(n => n.Coordinates() == currentShip.Top); var bottom = Buttons.First(n => n.Coordinates() == currentShip.Bottom); top.Text = "⎯"; bottom.Text = "⎯"; } else { var left = Buttons.First(n => n.Coordinates() == currentShip.Left); var right = Buttons.First(n => n.Coordinates() == currentShip.Right); left.Text = "|"; right.Text = "|"; } currentShip = ships.FirstOrDefault(n => !n.Initialized); if (currentShip == null) { Buttons.ForEach(n => { n.IsEnabled = true; n.Clicked -= SetShip; n.Clicked += Hit; n.BackgroundColor = Color.White; }); NotifyOfPropertyChange(() => Initialized); StartGameAction?.Invoke(); } else { EnableEmpty(); } } }
IEnumerator Start() { timerImage.gameObject.SetActive(true); float timeRemaining = CountdownTime; while (timeRemaining > 0) { yield return(EndOfFrame); timeRemaining -= Time.deltaTime; //interpolate timer image's fill amount from 1 to 0 over CountdownTime seconds timerImage.fillAmount = timeRemaining / CountdownTime; //change timer display text to show timeRemaining (rounded up) timerDisplay.text = Mathf.CeilToInt(timeRemaining).ToString(); } StartGameAction?.Invoke(); gameObject.SetActive(false); }
protected override void OnButtonClicked() { var startGameAction = new StartGameAction(); ActionSystem.Instance.PerformAction(startGameAction); }
public async Task StartGame (string sessionId) { await Clients.Caller.SendAsync( "LogMessage", $"Received Request - StartGame ({sessionId})" ); UserModel user = await userManager.GetUserAsync( Context.GetHttpContext().User ); StartGameAction action = await gameActionService.StartGameAction( sessionId, user.UserId ); await DoAction( action ); }
public async Task StartGameAction(StartGameAction _, IDispatcher dispatcher) { await Task.Delay(500); dispatcher.Dispatch(new SetExpectedElementAction(atomicNumber: GetRandomElementAtomicNumber())); }