예제 #1
0
 public BossAttackScript(Game game, Boss boss)
 {
     _game = game;
     _boss = boss;
 }
예제 #2
0
파일: Level.cs 프로젝트: sergik/Cardio
 public void AddBoss(Boss boss)
 {
     boss.Level = this;
     AddEnemy(boss);
     AddStop(boss);
 }
예제 #3
0
파일: Boss.cs 프로젝트: sergik/Cardio
        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;
        }
예제 #4
0
 public GroupSwitchNearBossScript(Boss boss)
 {
     _boss = boss;
 }