public void Update(double ms, int w, int h) { if (ms - lastEnemy >= enemyInterval && ms < timeTillBoss) { lastEnemy = ms; int tempnum = Game.rand.Next(2); EnemyType et = enemies[(EnemyTypeEnum)tempnum]; EnemyModel m = new EnemyModel(Game.rand.Next(0, w - et.Width), 0, et.Width, et.Height, et.Fname); EnemyBl ebl = new EnemyBl(m, new EnemyType(et)); OnNewEntity(ebl); } if(ms>=timeTillBoss && !isBossIn) { isBossIn = true; EnemyType et = enemies[EnemyTypeEnum.Strong]; EnemyModel m = new EnemyModel(Game.rand.Next(0, w - et.Width), 0, et.Width, et.Height, et.Fname); EnemyBl ebl = new EnemyBl(m, new EnemyType(et)); ebl.Death += (s, e) => this.OnStageEnd(); OnNewEntity(ebl); } }
public EnemyBl(EnemyModel em, EnemyType t) { base.shape = em; this.etype = t; }