public void SetEnemyDefinition(EnemyDefinition def) { maxHP = def.HP; _currentHP = maxHP; itemRenderer.sprite = def.imageSprite; flashMask.sprite = def.imageSprite; }
public override Enemy SpawnNewItem(Vector3 position) { Enemy newEnemy = base.SpawnNewItem(position); EnemyDefinition def = possibleEnemies[Random.Range(0, possibleEnemies.Length)]; newEnemy.SetEnemyDefinition(def); return(newEnemy); }