示例#1
0
        public void testPowerupDuration()
        {
            //arrange

            //level
            string level = "{\"powerups\":[{\"x\":1,\"y\":1,\"height\":1,\"width\":1,\"type\":2}],\"player\":{\"img\":null,\"positions\":{\"current_position\":{\"x\":1,\"y\":1},\"last_position\":{\"x\":0,\"y\":0}},\"speed\":{\"x\":3,\"y\":3},\"movement\":{\"walk\":{\"x\":3,\"y\":3},\"run\":{\"x\":5,\"y\":5}},\"sizeBreedte\":34,\"sizeHoogte\":55}}";
            startScreen startscreen = new startScreen();

            this.game = new TheHunt.View.Game.Player(startscreen, level);

            /*TheHunt.Model.Powerups powerupEmp = new TheHunt.Model.Powerups();
            powerupEmp.type = TheHunt.Model.Powerups.Type.Emp;
            powerupEmp.UsePowerup(game);*/

            //Powerups powerUp = this.game.getWorld().powerups[0];
               // powerUp.UsePowerup(this.game);
            /*
            Timer loop = new Timer();
            loop.Interval = 2000;
            loop.Elapsed += Loop_Elapsed;
            loop.Start();*/

            //act

            //assert
        }
示例#2
0
 public selectLevel(startScreen form, string nextStage)
 {
     InitializeComponent();
     this.formulier = form;
     this.nextStage = nextStage;
 }
示例#3
0
        public Player(startScreen start, string level)
        {
            InitializeComponent();

            // Set the start form
            this.startScreen = start;

            // Set the level
            this.levelString = level;

            // Set double buffer to prevent flickering
            this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.DoubleBuffer, true);
        }