resolve merge conflict
This commit is contained in:
commit
318cda7673
3 changed files with 40 additions and 4 deletions
|
@ -1,9 +1,9 @@
|
|||
package com.monjaro.gamejam;
|
||||
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
||||
|
||||
public abstract class Actor {
|
||||
|
||||
public abstract void tick();
|
||||
|
||||
public abstract void render(SpriteBatch batch);
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
package com.monjaro.gamejam;
|
||||
|
||||
import com.badlogic.gdx.math.Rectangle;
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
||||
|
||||
public class Die extends Actor {
|
||||
|
||||
private Rectangle shape;
|
||||
/*
|
||||
0
|
||||
1 2 3 4
|
||||
|
@ -16,6 +18,16 @@ public class Die extends Actor {
|
|||
for (int i = 0; i < faces.length; i++) {
|
||||
faces[i] = new Face(pips[i]);
|
||||
}
|
||||
shape = new Rectangle();
|
||||
}
|
||||
|
||||
public void setPosition(float x, float y){
|
||||
shape.setX(x);
|
||||
shape.setY(y);
|
||||
}
|
||||
|
||||
public void setSize(float w, float h){
|
||||
shape.setSize(w, h);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -25,7 +37,9 @@ public class Die extends Actor {
|
|||
|
||||
@Override
|
||||
public void render(SpriteBatch batch) {
|
||||
|
||||
for (Face face : faces) {
|
||||
face.render(batch);
|
||||
}
|
||||
}
|
||||
|
||||
public void roll() {
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
package com.monjaro.gamejam;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
||||
import com.badlogic.gdx.math.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class Face {
|
||||
public class Face extends Actor{
|
||||
|
||||
private Rectangle shape;
|
||||
|
||||
private final List<Pip> pips = new ArrayList<>();
|
||||
|
||||
|
@ -43,4 +46,23 @@ public class Face {
|
|||
|
||||
}
|
||||
|
||||
public void setPosition(float x, float y){
|
||||
shape.setX(x);
|
||||
shape.setY(y);
|
||||
}
|
||||
|
||||
public void setSize(float w, float h){
|
||||
shape.setSize(w, h);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(SpriteBatch batch) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue