Exemplo n.º 1
0
        public void CommandValidityTest()
        {
            Command c = new Command(new Point(35, 75), PsychicNinja.Data.Util.CommandType.Jump);
            Platform p = new Platform(new Rectangle(35, 75, 40, 80));

            c.ConnectToPlatform(p);

            Assert.Equal(false, c.ConnectedPlatforms.Count > 0);
        }
Exemplo n.º 2
0
        public void CommandCollisionTest()
        {
            Command c = new Command(new Point(35, 75), PsychicNinja.Data.Util.CommandType.LedgeClimb);
            Platform p = new Platform(new Rectangle(35, 75, 40, 80));

            c.ConnectToPlatform(p);

            Assert.Equal(true, c.CollidesWithConnectedPlatforms(new Platform(new Rectangle(70, 65, 40, 80))) != null);
        }
Exemplo n.º 3
0
        public void CommandConnectionTest()
        {
            Command c = new Command(new Point(35, 75), PsychicNinja.Data.Util.CommandType.LedgeClimb);
            Platform p = new Platform(new Rectangle(35, 75, 40, 80));

            c.ConnectToPlatform(p);

            Assert.Equal(true, c.ConnectedPlatforms.Count > 0);
        }
Exemplo n.º 4
0
 //used to attach a wall command to a wall durring runtime
 private void livingWallConnect(Command c, LinkedList<Platform> listOfWorldPlatforms)
 {
     foreach (Platform p in listOfWorldPlatforms)
     {
         //if(p.drawRect.Intersects(c.drawRect))
             c.ConnectToPlatform(p);
     }
 }