public Manager() { mVideo = Video.SetVideoMode(800, 300); p = new Publisher(); mAchtergrond = new Achtergrond(mVideo); mEnemy = new Enemy(mVideo); mEnemy2 = new Enemy2(mVideo); p.AddVijand(mEnemy2); p.AddVijand(mEnemy); mHero = new Hero(mVideo, p); mHero = new ShootHero(mVideo, mHero); mHero = new FlyHero(mVideo, mHero); //Terug naar origine hero! ((FlyHero)mHero).theHero = null; mHero = new ShootHero(mVideo, mHero); collection = new SpriteCollection(); collection.Add(mHero); //collection.Add(shootHero); collection.Add(mEnemy); collection.Add(mEnemy2); Events.KeyboardDown += Events_KeyboardDown; //collection.EnableTickEvent(); //collection.EnableKeyboardEvent(); init(); Events.Tick += new EventHandler<TickEventArgs>(Events_Tick); Events.Run(); }
public Hero(Surface vid, Publisher pub) { p = pub; Init(vid); }