Пример #1
0
 public void OnCollisionEnter2D(Collision2D collision)
 {
     NotifyObservers("UpdateScore");
     Instantiate(RouletteWheelSelection.GetRandomByWeight(posiblesPowerUPS, weights), this.transform.position, this.transform.rotation);
     Instantiate(explosion, this.transform.position, this.transform.rotation);
     _enemyPool.ReturnEnemyToPool(this);
 }
Пример #2
0
 public void OnCollisionEnter2D(Collision2D collision)
 {
     Instantiate(explosion, this.transform.position, this.transform.rotation);
     Instantiate(RouletteWheelSelection.GetRandomByWeight(posiblesPowerUPS, weights), this.transform.position, this.transform.rotation);
     StartCoroutine(DestroyHeroBulletOnCollision(1f));
 }