Пример #1
0
 public Slime (Surface video, Point position, Slimes slimes, string direction):base(video){
     this.position = position;
     this.video = video;
     this.direction = direction;
     image_right = new Surface("slime.png");
     xVelocity = 10;
     this.slimes = slimes;
     slimes.Add(this);            
     colRectangle = new Rectangle(position.X, position.Y, 15, 5);
     sndPain.Volume = 15;
 }
Пример #2
0
 public Slime(Surface video, Point position, Slimes slimes, string direction) : base(video)
 {
     this.position  = position;
     this.video     = video;
     this.direction = direction;
     image_right    = new Surface("slime.png");
     xVelocity      = 10;
     this.slimes    = slimes;
     slimes.Add(this);
     colRectangle   = new Rectangle(position.X, position.Y, 15, 5);
     sndPain.Volume = 15;
 }
Пример #3
0
        public Manager()
        {
            mVideo                 = Video.SetVideoMode(794, 494);
            Console.Title          = "Alien Terrorist Killer";
            hero                   = new Hero(mVideo, SdlDotNet.Input.Key.A, SdlDotNet.Input.Key.D, SdlDotNet.Input.Key.Space, SdlDotNet.Input.MouseButton.PrimaryButton); // QWERTY dus A = Q
            enemy_1                = new Point(10, 305);
            enemy_2                = new Point(570, 305);
            enemy_3                = new Point(340, 185);
            enemy_4                = new Point(650, 65);
            heartContainerPoint    = new Point(725, 185);
            heartPoint             = new Point(20, 20);
            heartPoint2            = new Point(70, 20);
            heartPoint3            = new Point(120, 20);
            vijand1                = new Vijand(mVideo, enemy_1, 100, 290);
            vijand2                = new Vijand(mVideo, enemy_2, 570, 680);
            vijand3                = new Vijand(mVideo, enemy_3, 340, 570);
            vijand4                = new Vijand(mVideo, enemy_4, 650, 700);
            groundColRectangle     = new Rectangle(0, 480, 794, 24); //486 = 510(17*30) - 24(Ground height) --- 794 (Ground width) 24 (Ground height)
            platform1_ColRectangle = new Rectangle(0, 360, 350, 15);
            platform2_ColRectangle = new Rectangle(570, 360, 350, 15);
            platform3_ColRectangle = new Rectangle(300, 240, 350, 15); // x = 10, y = 8 --> 10  *30 = 300 /// 8 * 30 = 240  /// x en y vanaf 0 tellen in array!
            platform4_ColRectangle = new Rectangle(660, 120, 350, 15);
            spikes1_ColRectangle   = new Rectangle(420, 420, 85, 71);
            lasers                 = new Lasers();
            slimes                 = new Slimes();
            level1                 = new Level1(mVideo);
            level2                 = new Level2(mVideo);
            startscreen            = new Startscreen(mVideo);
            endscreen              = new Endscreen(mVideo);
            activelevel            = startscreen;
            immuneTimer            = 0;
            drawTimer              = 0;
            shootTimer             = 0;
            audioThread.Start();
            sndLaser.Volume = sndPain.Volume = 15;

            Events.Tick += Events_Tick;
            Events.Run();
        }
Пример #4
0
 public Manager()
 {
     mVideo = Video.SetVideoMode(794, 494);           
     Console.Title = "Alien Terrorist Killer";
     hero = new Hero(mVideo, SdlDotNet.Input.Key.A, SdlDotNet.Input.Key.D, SdlDotNet.Input.Key.Space, SdlDotNet.Input.MouseButton.PrimaryButton); // QWERTY dus A = Q           
     enemy_1 = new Point(10, 305);
     enemy_2 = new Point(570, 305);
     enemy_3 = new Point(340, 185);
     enemy_4 = new Point(650, 65);
     heartContainerPoint = new Point(725, 185);
     heartPoint = new Point(20, 20);
     heartPoint2 = new Point(70, 20);
     heartPoint3 = new Point(120, 20);
     vijand1 = new Vijand(mVideo, enemy_1, 100, 290);
     vijand2 = new Vijand(mVideo, enemy_2, 570, 680);
     vijand3 = new Vijand(mVideo, enemy_3, 340, 570);
     vijand4 = new Vijand(mVideo, enemy_4, 650, 700);
     groundColRectangle = new Rectangle(0, 480, 794, 24); //486 = 510(17*30) - 24(Ground height) --- 794 (Ground width) 24 (Ground height)
     platform1_ColRectangle = new Rectangle(0, 360, 350, 15); 
     platform2_ColRectangle = new Rectangle(570, 360, 350, 15);
     platform3_ColRectangle = new Rectangle(300, 240, 350, 15); // x = 10, y = 8 --> 10  *30 = 300 /// 8 * 30 = 240  /// x en y vanaf 0 tellen in array! 
     platform4_ColRectangle = new Rectangle(660, 120, 350, 15);
     spikes1_ColRectangle = new Rectangle(420, 420, 85, 71);
     lasers = new Lasers();
     slimes = new Slimes();
     level1 = new Level1(mVideo);
     level2 = new Level2(mVideo);
     startscreen = new Startscreen(mVideo);
     endscreen = new Endscreen(mVideo);
     activelevel = startscreen;
     immuneTimer = 0;
     drawTimer = 0;
     shootTimer = 0;
     audioThread.Start();
     sndLaser.Volume = sndPain.Volume = 15;           
              
     Events.Tick += Events_Tick;
     Events.Run();
 }