示例#1
0
 public void Init(IInitContext context, Settings.Enemy settings, Path path)
 {
     this.settings = settings;
     Path          = path;
     dispatcher    = context.Dispatcher;
     Center        = Vector2.Zero;
     Status        = EnemyStatus.Ready;
     Health        = settings.Health;
 }
示例#2
0
 public void Init(IInitContext context, Settings.EnemySet settings, Settings.Enemy enemySettings, Settings.Path pathSettings)
 {
     initContext   = context;
     this.settings = settings;
     Path          = context.ObjectPool.GetObject <Path>();
     Path.Init(pathSettings);
     this.enemySettings = enemySettings;
     enemies            = context.ObjectPool.GetObject <List <Enemy> >();
     completedEnemies   = context.ObjectPool.GetObject <List <Enemy> >();
     enemyTemplate      = EnemyFactory.GetEnemyFromPool(context.ObjectPool, enemySettings);
     logger.Info($"Wave {settings.Id} init");
     Relative = TimeSpan.FromMilliseconds(settings.StartTimeOffset);
     Status   = EnemySetStatus.Ready;
 }