public void EndGame() { Console.WriteLine($"Game has ended, {Turn} Won"); isGameEnded = true; ShowCustomPanelEvent?.Invoke(R.end_game_title, Turn ? App.pathToCustomImageEndBlue : App.pathToCustomImageEndRed, R.end_game_legend, R.end_game_bottom_title); EndGameEvent?.Invoke(); }
private void OnEndGame(EndGameEvent e) { this.endGameContainer.SetActive(true); this.pointsEndGameTxt.text = string.Format("Points {0}", GameManager.Instance.GetPoints()); this.highScorePointsEndGameTxt.text = string.Format("HighScore {0}", GameManager.Instance.GetHighScore()); this.spaceShip.sprite = ResourceManager.Instance.GetShipSprite((Ship)StorageManager.Instance.GetInt(Env.CURRENT_SHIP_KEY, (int)Ship.green)); }
// Start is called before the first frame update void Start() { _boxSelection = FindObjectOfType <BoxSelection>(); _resourceManager = FindObjectOfType <ResourceManager>(); _endGameEvent = FindObjectOfType <EndGameEvent>(); _sender = GetComponent <PubSubSender>(); }
public void OnHealthChangeEvent(int damage) { _baseHealth -= damage; if (_baseHealth <= 0) { EndGameEvent?.Invoke(); } HealthChangeEvent?.Invoke(_baseHealth); }
private void OnEndGameEvent(EndGameEvent @event) { var teamScoreEvent = new TeamScoreEvent() { Score = GetTeamScore() }; _eventSystem.Publish(teamScoreEvent); }
public void EndGameListener(EndGameEvent endGameEvent) { var wrappedEvent = new { Fraction = endGameEvent.Winner.GetComponent <Army>().Fraction, }; RedirectLike(endGameEvent, wrappedEvent); }
private void OnEndGame(EndGameEvent e) { this.speedX = 100; this.speedY = -100; this.speedMultiply = 1; if (this.gameObject.activeInHierarchy) { this.DestroyEnemy(); } }
public void TakeDamage(int damage) { TakeHeatPointEvent?.Invoke(damage); DamageSoundEvent?.Invoke(); if (_health.hp <= 0) { Death(); EndGameEvent?.Invoke(); } Twinkle(); }
public void OnEndGame() { if (_score > _best) { _best = _score; } _view?.StopGame(); _view?.HudView.EndGameView?.Open(new EndGameController(this, _score, _best)); EndGameEvent?.Invoke(); }
private void OnKingTowerDead() { _view?.StopGame(); foreach (var o in _objects.ToArray()) { Destroy(o); } _objects.Clear(); EndGameEvent?.Invoke(); }
private void OnEndGameEvent(EndGameEvent @event) { foreach (var playerTuple in _playerMatcherGroup.MatchingEntities) { var playerScoreEvent = new PlayerScoreEvent() { PlayerEntityId = playerTuple.Entity.Id, ResourceManagement = playerTuple.Component2.ResourceManagement, Systematicity = playerTuple.Component2.Systematicity, }; _eventSystem.Publish(playerScoreEvent); } }
private void OnPlayerDead() { _view?.StopGame(); _view?.HudView.EndGameView?.Open(new EndGameController(this)); foreach (var o in _objects.ToArray()) { Destroy(o); } _objects.Clear(); EndGameEvent?.Invoke(); }
// Start is called before the first frame update void Start() { PublishOilUpdate(); PublishMoneyUpdate(); PublishEquipmentUpdate(); PublishEnvironmentHealthUpdate(); PublishPublicSentimentUpdate(); PublishOilStorageUpdate(); PurchaseStartingOilSlick(); _oilSlickManager = FindObjectOfType <OilSlickManager>(); _endGameEvent = FindObjectOfType <EndGameEvent>(); }
private void OnEndGame(EndGameEvent endGame) { if (newHighScoreLabel != null && highScoreText != null) { newHighScoreLabel.SetActive (true); highScoreText.text = string.Format ("Final Score: {0}", endGame.Score); } if (newMaxHeightLabel != null && maxHeightText != null) { newMaxHeightLabel.SetActive (true); maxHeightText.text = string.Format ("Final Height: {0} Meters", (int)endGame.Height); } }
// Конец игры private static IEnumerator GameOver() { yield return(new WaitForSeconds(endGameDelayDuration)); Instance.winPanel.SetActive(true); PlaySound(GetAlphabet().GameOverClip, true); while (Instance.audioSource.isPlaying) { yield return(null); } EndGameEvent?.Invoke(); }
void endGame(EndGameEvent e) { Services.Audio.PlaySoundEffect(Services.Clips.GameWin, 0.6f); if (!isDropSpawner) { Destroy(gameObject); } else { timeBetweenSpawnsBase = .01f; //Debug.Log(e.gameLength+ " "+getNumEndJuiceBubbles(e.gameLength)); StartCoroutine(resetGame(getNumEndJuiceBubbles(e.gameLength))); } }
private static void CheckWin() { if (deck.Count == 0 && (handList.Count == 0 || enemyList.Count == 0)) { if (handList.Count == 0 && enemyList.Count == 0) { MessageBox.Show("Ничья", "Игра закончена", MessageBoxButton.OK, MessageBoxImage.Information); } else if (handList.Count == 0 && enemyList.Count != 0) { MessageBox.Show("Вы выиграли", "Игра закончена", MessageBoxButton.OK, MessageBoxImage.Information); } else if (handList.Count != 0 && enemyList.Count == 0) { MessageBox.Show("Вы проиграли", "Игра закончена", MessageBoxButton.OK, MessageBoxImage.Information); } EndGameEvent?.Invoke(); } }
private void GameEnded(EndGameEvent e) { switch (e.winner) { case Player.GhostPlayer: _endText.text = _ghostWinText; break; case Player.HunterPlayer: _endText.text = _hunterWinText; break; case Player.NoPlayer: _endText.text = _noPlayerWinText; break; } switch (e.rationale) { case EndReason.HunterCaughtGhost: _endTextReason.text = _hunterCaughtGhostText; break; case EndReason.GhostHauntedHouse: _endTextReason.text = _ghostHauntedHouseText; break; case EndReason.HunterCaughtGhostInSameBody: _endTextReason.text = _hunterCaughtGhostInSameBodyText; break; case EndReason.HunterCaughtInnocent: _endTextReason.text = _hunterCaughtInnocentText; break; } _gameOver = true; _restartMessageObject.SetActive(true); }
public void StartTracking() { _isTracking = true; _task = Task.Run(() => { while (_isTracking) { string strMessage = _bluetoothService.Bluetooth.Read(); if (strMessage != null && int.TryParse(strMessage, out int score)) { int deltaScore = score - _gameStats.Score; _gameStats.Score += deltaScore; _gameStats.AtomicIncrementCoins(deltaScore); } else if (strMessage != null && strMessage.Equals("e") && _isTracking) { //StopTracking(); EndGameEvent?.Invoke(this, false); } } System.Diagnostics.Debug.Print("Score Tracking Ended"); }); }
public void OnEvent(EndGameEvent args) { _startWindowFactory.Create(); }
private void onGameEndEvent(EndGameEvent e) { moving = false; }
public void EndGame(EndGameEvent endGameEvent) { _aIRepository.RemoveAI(Id); }
private void Death() { DeathEvent?.Invoke(); EndGameEvent?.Invoke(); _isMooving = false; }
public void EndGame() { Physics2D.autoSimulation = false; EndGameEvent?.Invoke(); }
protected virtual void OnEndGameEvent(EndGameEventArgs e) { EndGameEvent?.Invoke(this, e); }
private void ReceiveEndGameUpdate(string update) { State.StatusMessage = update; State.GameStatus = GameStatus.Ending; EndGameEvent?.Invoke(this, new EventArgs()); }
public void EndGame() { EndGameEvent?.Invoke(); }
void endGame(EndGameEvent e) { timeBetweenMoves.y = .2f; difficultyIncreasesCount = 0; }
private void endGame(EndGameEvent.OnEndGame eventData) { Debug.Log("Ending the game"); PlayerPrefs.SetInt("gameStatus", eventData.gameStatus ? 1 : 0); Application.LoadLevel("EndGameScene"); }
public override void OnGameEnd(int turn, EndGameEvent ev, Player winner = null) { throw new System.NotImplementedException(); }
void RevealRoleAtEnd(EndGameEvent e) { IsRevealed = true; }
public GameEvent GetEndGameEvent() { var endGameEvent = new EndGameEvent (_core.GetNewEventId(), _core); return endGameEvent; }