fix merge

This commit is contained in:
James 2024-04-21 15:15:17 +01:00
commit a165f284de
10 changed files with 8 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 855 B

After

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
assets/shop_banner.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View file

@ -19,9 +19,14 @@ public class Face extends Actor{
private static Texture blankFaceSprite; private static Texture blankFaceSprite;
private static Texture pipSprite; private static Texture pipSprite;
int faceNumber;
public Face(int pipCount, Transform transform) { public Face(int pipCount, Transform transform) {
addPipsForValue(pipCount); addPipsForValue(pipCount);
this.transform = transform; this.transform = transform;
Random rand = new Random();
faceNumber = rand.nextInt(0, 5);
} }
private void addPipsForValue(int value){ private void addPipsForValue(int value){
@ -106,7 +111,7 @@ public class Face extends Actor{
@Override @Override
public void render(SpriteBatch batch) { public void render(SpriteBatch batch) {
Sprite face = new Sprite(blankFaceSprite); Sprite face = new Sprite(blankFaceSprite, 64*faceNumber, 0, 64, 64);
face.setOrigin(face.getWidth()/2, face.getHeight()/2); face.setOrigin(face.getWidth()/2, face.getHeight()/2);
face.rotate(transform.getRotation()); face.rotate(transform.getRotation());
face.setPosition(transform.x-face.getWidth()/2, transform.y-face.getHeight()/2); face.setPosition(transform.x-face.getWidth()/2, transform.y-face.getHeight()/2);

View file

@ -44,7 +44,8 @@ public class Game extends ApplicationAdapter {
ui = new UI(this, 50, 280); ui = new UI(this, 50, 280);
Face.setBlankFaceSprite(new Texture("blank_die_face.png")); Face.setBlankFaceSprite(new Texture("blank_die_faces_sheet.png"));
Face.setPipSprite(new Texture("pip.png")); Face.setPipSprite(new Texture("pip.png"));
Die.setLockedSprite(new Texture("locked_die_border.png")); Die.setLockedSprite(new Texture("locked_die_border.png"));
UI.setRerollTexture(new Texture("reroll_symbol.png")); UI.setRerollTexture(new Texture("reroll_symbol.png"));