diff --git a/core/src/com/me/brickbuster/entity/Brick.java b/core/src/com/me/brickbuster/entity/Brick.java index 9a18384..7d4066e 100644 --- a/core/src/com/me/brickbuster/entity/Brick.java +++ b/core/src/com/me/brickbuster/entity/Brick.java @@ -165,6 +165,62 @@ public class Brick extends Entity implements PhysicsBody, CollisionListener { 0, -BRICK_HEIGHT/2, // Bottom left }); break; + case RIGHT_DOWN_RIGHT_TRIANGLE: + brickShape.set(new float[] { + BRICK_WIDTH/2, BRICK_HEIGHT/2, // Top right + BRICK_WIDTH/2, -BRICK_HEIGHT/2, // Bottom right + 0, -BRICK_HEIGHT/2, // Bottom left + }); + break; + case RIGHT_UP_RIGHT_TRIANGLE: + brickShape.set(new float[] { + BRICK_WIDTH/2, BRICK_HEIGHT/2, // Top right + BRICK_WIDTH/2, -BRICK_HEIGHT/2, // Bottom right + 0, BRICK_HEIGHT/2, // Top left + }); + break; + case RIGHT_UP_LEFT_TRIANGLE: + brickShape.set(new float[] { + 0, BRICK_HEIGHT/2, // Top left + BRICK_WIDTH/2, BRICK_HEIGHT/2, // Top right + 0, -BRICK_HEIGHT/2, // Bottom left + }); + break; + case RIGHT_DOWN_LEFT_TRIANGLE: + brickShape.set(new float[] { + 0, BRICK_HEIGHT/2, // Top left + BRICK_WIDTH/2, -BRICK_HEIGHT/2, // Bottom right + 0, -BRICK_HEIGHT/2, // Bottom left + }); + break; + case LEFT_DOWN_RIGHT_TRIANGLE: + brickShape.set(new float[] { + 0, BRICK_HEIGHT/2, // Top right + 0, -BRICK_HEIGHT/2, // Bottom right + -BRICK_WIDTH/2, -BRICK_HEIGHT/2, // Bottom left + }); + break; + case LEFT_UP_RIGHT_TRIANGLE: + brickShape.set(new float[] { + 0, BRICK_HEIGHT/2, // Top right + 0, -BRICK_HEIGHT/2, // Bottom right + -BRICK_WIDTH/2, BRICK_HEIGHT/2, // Top left + }); + break; + case LEFT_UP_LEFT_TRIANGLE: + brickShape.set(new float[] { + -BRICK_WIDTH/2, BRICK_HEIGHT/2, // Top left + 0, BRICK_HEIGHT/2, // Top right + -BRICK_WIDTH/2, -BRICK_HEIGHT/2, // Bottom left + }); + break; + case LEFT_DOWN_LEFT_TRIANGLE: + brickShape.set(new float[] { + -BRICK_WIDTH/2, BRICK_HEIGHT/2, // Top left + 0, -BRICK_HEIGHT/2, // Bottom right + -BRICK_WIDTH/2, -BRICK_HEIGHT/2, // Bottom left + }); + break; default: brickShape.setAsBox(BRICK_WIDTH/2, BRICK_HEIGHT/2, Vector2.Zero, 0f); } diff --git a/core/src/com/me/brickbuster/entity/BrickShape.java b/core/src/com/me/brickbuster/entity/BrickShape.java index 2d520e7..469def5 100644 --- a/core/src/com/me/brickbuster/entity/BrickShape.java +++ b/core/src/com/me/brickbuster/entity/BrickShape.java @@ -12,6 +12,14 @@ public enum BrickShape { HALF_LOWER, HALF_LEFT, HALF_RIGHT, + RIGHT_DOWN_RIGHT_TRIANGLE, + RIGHT_UP_RIGHT_TRIANGLE, + RIGHT_UP_LEFT_TRIANGLE, + RIGHT_DOWN_LEFT_TRIANGLE, + LEFT_DOWN_RIGHT_TRIANGLE, + LEFT_UP_RIGHT_TRIANGLE, + LEFT_UP_LEFT_TRIANGLE, + LEFT_DOWN_LEFT_TRIANGLE, ; }