private void OnUnitKilled(GameUnit gameUnit) { if (gameUnit.GetTeam() != 0) { // Increase the player's score. GameLogicMgr gameLogicMgr = GameLogicMgr.GetInstance(); gameLogicMgr.Score += 1; } }
private void OnBuildingDestroyed(GameBuilding destroyedBuilding) { GameLogicMgr gameLogicMgr = GameLogicMgr.GetInstance(); if (destroyedBuilding.GetTeam() != 0) { // Display you won message. gameLogicMgr.GameWon(); } else { // Display the you lost message. gameLogicMgr.GameOver(); } }
public void OnQuitBtn() { GameLogicMgr.GetInstance().GameOver(); }
// Use this for initialization void Start() { _scoreDispTxt = gameObject.GetComponent <Text>(); _gameLogicMgr = GameLogicMgr.GetInstance(); }