public override void EnemyDies() { EnemyBroker.CallEnemyKilled(pointValue, scrapValue); //The effect has a self destruct script. Otherwise I would have to destroy it here after instatiate. GameObject enemyExplosionEffect = Instantiate(enemyExplosion, transform.position, Quaternion.identity); //Debug.Log("Enemy Destroyed"); //enemyAnimatorController.SetTrigger("enemyDied"); Destroy(gameObject); }
public override void EnemyDies() { EnemyBroker.CallEnemyKilled(pointValue, scrapValue); Destroy(gameObject); }