public void Initialize(PamBossAnimation animation, Vector2 position) { PamBossAnimation = animation; Position = position; Interval = TimeSpan.FromSeconds(5.0f); //Interval = TimeSpan.FromSeconds(9.0f); Active = true; }
public void UpdateBoss(GameTime gameTime) { if (BossSpawnCount == 0) { if (Level == 1) { BossToasterAnimation bossToasterAnimation = new BossToasterAnimation(); bossToasterAnimation.Initialize(bossToasterTexture, 0, 154, 151); Vector2 position = new Vector2(500, 500); bossToaster.Initialize(bossToasterAnimation, position); BossSpawnCount = 1; } else if (Level == 2) { BossToasterAnimation bossToasterAnimation2 = new BossToasterAnimation(); bossToasterAnimation2.Initialize(bossToasterTexture, 0, 154, 151); Vector2 position = new Vector2(500, 500); bossToaster2.Initialize(bossToasterAnimation2, position); BossSpawnCount = 1; } else if (Level == 3) { PamBossAnimation pamBossAnimation = new PamBossAnimation(); pamBossAnimation.Initialize(pamBossTexture, 0, 50, 100); Vector2 position = new Vector2(500, 500); pamBoss.Initialize(pamBossAnimation, position); BossSpawnCount = 1; } } if(Level == 1) bossToaster.Update(gameTime, this); if(Level == 2) bossToaster2.Update(gameTime, this); if (Level == 3) pamBoss.Update(gameTime, this); }