factory pattern for zombie error
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
using Darkmatter.Core;
|
||||
using UnityEngine;
|
||||
using VContainer;
|
||||
|
||||
namespace Darkmatter.Presentation
|
||||
{
|
||||
public class EnemiesSpawnner : MonoBehaviour
|
||||
{
|
||||
[Inject] IEnemyFactory _enemyFactory;
|
||||
public int enemiesCount = 2;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
for (int i = 0;i< enemiesCount;i++)
|
||||
{
|
||||
_enemyFactory.GetEnemy(ZombieType.Fat);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user