void OnDestroy() { Debug.Log(m_cPlayer.getHealth()); if (m_nNextTarget == m_arTargetTransform.Length) { m_cPlayer.downHealth(); } }
public void UpdateUi(C_PLAYER cPlayer, C_GAMECOIN cGameCoin, C_INPUT cInput) { m_txtGold.text = cPlayer.getGoid().ToString(); m_txtCoinCount.text = cPlayer.getCoin().ToString(); m_txtHealth.text = cPlayer.getHealth().ToString(); m_txtCoinName.text = cGameCoin.getCoinName(); m_txtCoinFlutuation.text = cGameCoin.getFlutuatuion().ToString() + "%"; m_txtCoinPrice.text = cGameCoin.getCoinPrice().ToString(); m_txtUpgradeTower.text = cInput.getUpgradePrice().ToString(); }
private void gameOver() { if (m_cPlayer.getHealth() == 0) { m_cGameOver.gameObject.SetActive(true); m_cGameOver.GameEnding(true); } if (m_cStageMgr.getEnemyWave().GetComponent <C_ENEMYWAVE>().getStageCount() > 60) { m_cGameOver.gameObject.SetActive(true); m_cGameOver.GameEnding(false); m_cInput.setPuase(); } }