public BossAttackScript(Game game, Boss boss) { _game = game; _boss = boss; }
public void AddBoss(Boss boss) { boss.Level = this; AddEnemy(boss); AddStop(boss); }
public static Boss FromMetadata(BossMetadata metadata, ContentManager contentManager) { var boss = new Boss(); FillWithMetadata(boss, metadata, contentManager); boss.AttackDamage = metadata.AttackDamage; boss.GenerateScript = new GenerateEnemiesScript(); foreach(var enemyType in metadata.EnemyTypes) { boss.GenerateScript.EnemyTypes.Add(enemyType); } boss.GenerateScript.EnemiesToGenerateMin = metadata.EnemiesToGenerateMin; boss.GenerateScript.EnemiesToGenerateMax = metadata.EnemiesToGenerateMax; boss.GenerateScript.GenerateEnemiesIntervalMin = TimeSpan.FromSeconds(metadata.GenerateEnemiesIntervalMin); boss.GenerateScript.GenerateEnemiesIntervalMax = TimeSpan.FromSeconds(metadata.GenerateEnemiesIntervalMax); boss.GenerateScript.GenerationStartDistance = 600; boss.AttackRange = metadata.AttackRange; boss.AttackDamage = metadata.AttackDamage; boss.AttackInterval = metadata.AttackInterval; boss.AttackRateMax = metadata.AttackRateMax; boss.AttackRateMin = metadata.AttackRateMin; boss.BulletSpeed = metadata.BulletSpeed; boss.BulletContentPath = metadata.BulletContentPath; boss.AttackMode = -1; boss._generating = false; boss.AddScript(boss.GenerateScript); return boss; }
public GroupSwitchNearBossScript(Boss boss) { _boss = boss; }