This commit is contained in:
Rosia E Evans 2024-04-21 15:04:04 +01:00
parent 7632c476fa
commit b212f1884d
10 changed files with 7 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

Before After
Before After

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

Before After
Before After

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 pipSprite;
int faceNumber;
public Face(int pipCount, Transform transform) {
addPipsForValue(pipCount);
this.transform = transform;
Random rand = new Random();
faceNumber = rand.nextInt(0, 5);
}
private void addPipsForValue(int value){
@ -106,7 +111,7 @@ public class Face extends Actor{
@Override
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.rotate(transform.getRotation());
face.setPosition(transform.x-face.getWidth()/2, transform.y-face.getHeight()/2);

View file

@ -47,7 +47,7 @@ public class Game extends ApplicationAdapter {
reroll();
nextRound();
Face.setBlankFaceSprite(new Texture("blank_die_face.png"));
Face.setBlankFaceSprite(new Texture("blank_die_faces_sheet.png"));
Face.setPipSprite(new Texture("pip.png"));
Die.setLockedSprite(new Texture("locked_die_border.png"));
UI.setRerollTexture(new Texture("reroll_symbol.png"));