Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 2
0
 public void ResetGameScore()
 {
     currentGameScore = 0;
     GlobalEvents.AddGameScore(this, new GameScoreArgs(0));
 }
Ejemplo n.º 3
0
 internal override void CollectItem()
 {
     GameObject.FindGameObjectWithTag("POWER_UP").GetComponent <AudioSource>().Play();
     GlobalEvents.AddGameScore(this, new GameScoreArgs(extraPointToAdd));
     FindObjectOfType <ItemPanel>().ShowItemPanel(2, "Extra Points");
 }