internal virtual void Die() { GameObject.FindGameObjectWithTag("DEATH").GetComponent <AudioSource>().Play(); var random = Random.Range(0, 100); if (random <= chanceToDropItems) { DropItem(); } GlobalEvents.EnemyDeath(this, null); GlobalEvents.AddGameScore(this, new GameScoreArgs(10)); Destroy(this.gameObject); }
public void ResetGameScore() { currentGameScore = 0; GlobalEvents.AddGameScore(this, new GameScoreArgs(0)); }
internal override void CollectItem() { GameObject.FindGameObjectWithTag("POWER_UP").GetComponent <AudioSource>().Play(); GlobalEvents.AddGameScore(this, new GameScoreArgs(extraPointToAdd)); FindObjectOfType <ItemPanel>().ShowItemPanel(2, "Extra Points"); }