Exemplo n.º 1
0
        protected void CreateWorld()
        {
            Block b = new Block(new Rectangle(0, 400, 180, 32), blockSprite);
            worldElements.Add(b);

            b = new Block(new Rectangle(200, 400, 80, 32), blockSprite);
            worldElements.Add(b);

            b = new Block(new Rectangle(320, 400, 80, 32), blockSprite);
            worldElements.Add(b);

            b = new Block(new Rectangle(460, 400, 300, 32), blockSprite);
            worldElements.Add(b);
        }
Exemplo n.º 2
0
 public void OnWorldCollision(Block block)
 {
     if (MovementState == EntityMovementState.Falling)
     {
         MovementState = EntityMovementState.Walking;
     }
 }