Skip to content
Snippets Groups Projects
Commit 73d810e0 authored by Petter Selfors Rølvåg's avatar Petter Selfors Rølvåg
Browse files

dirtyflag

parent e721c5a9
No related branches found
No related tags found
2 merge requests!13Dev,!12Pipe and filter
...@@ -54,8 +54,10 @@ public class UniCheckersClient extends ApplicationAdapter { ...@@ -54,8 +54,10 @@ public class UniCheckersClient extends ApplicationAdapter {
skin = new Skin(Gdx.files.internal("UISkins/glassy/skin/glassy-ui.json")); skin = new Skin(Gdx.files.internal("UISkins/glassy/skin/glassy-ui.json"));
gvm = new GameViewManager(); gvm = new GameViewManager();
//gvm.push(new LoadingView(gvm, playerController, assetManager, stage, skin));
gvm.push(new PlayView(gvm, playerController, assetManager, stage, skin));
gvm.push(new LoadingView(gvm, playerController, assetManager, stage, skin));
//gvm.push(new PlayView(gvm, playerController, assetManager, stage, skin));
} }
......
...@@ -46,6 +46,7 @@ public class PlayView extends View{ ...@@ -46,6 +46,7 @@ public class PlayView extends View{
starPieceHeadBorder = (Texture) assetManager.get(PlayAssets.STAR_PIECE_HEAD_BORDER.path, PlayAssets.STAR_PIECE_HEAD_BORDER.classType); starPieceHeadBorder = (Texture) assetManager.get(PlayAssets.STAR_PIECE_HEAD_BORDER.path, PlayAssets.STAR_PIECE_HEAD_BORDER.classType);
piece = new StarPiece(0 , 0, Color.RED, starPieceBase, starPieceBaseBorder, starPieceMast, starPieceMastBorder, starPieceHead, starPieceHeadBorder); piece = new StarPiece(0 , 0, Color.RED, starPieceBase, starPieceBaseBorder, starPieceMast, starPieceMastBorder, starPieceHead, starPieceHeadBorder);
piece.setRotateHead(true);
} }
StarPiece piece; StarPiece piece;
...@@ -82,6 +83,7 @@ public class PlayView extends View{ ...@@ -82,6 +83,7 @@ public class PlayView extends View{
piece.draw(stage.getBatch()); piece.draw(stage.getBatch());
piece.setPosition(Gdx.input.getX(), Gdx.input.getY());
......
...@@ -5,13 +5,13 @@ import com.badlogic.gdx.graphics.Texture; ...@@ -5,13 +5,13 @@ import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Batch; import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.g2d.Sprite; import com.badlogic.gdx.graphics.g2d.Sprite;
public class StarPiece extends Sprite { public class StarPiece {
private final Color color; private final Color color;
private Texture base; private Texture base;
private Texture baseBorder; private Texture baseBorder;
private final float xPos; private float xPos;
private final float yPos; private float yPos;
private Texture mast; private Texture mast;
private Texture mastBorder; private Texture mastBorder;
...@@ -33,7 +33,7 @@ public class StarPiece extends Sprite { ...@@ -33,7 +33,7 @@ public class StarPiece extends Sprite {
this.mastBorder = mastBorder; this.mastBorder = mastBorder;
this.head = head; this.head = head;
this.headBorder = headBorder; this.headBorder = headBorder;
rotateHead=true; this.rotateHead=false;
} }
...@@ -104,6 +104,28 @@ public class StarPiece extends Sprite { ...@@ -104,6 +104,28 @@ public class StarPiece extends Sprite {
} }
public void setX(float xPos){
this.xPos = xPos;
}
public void setY(float yPos){
this.yPos = yPos;
}
public float getX(){
return xPos;
}
public float getY(){
return yPos;
}
public void setPosition(float xPos, float yPos){
this.xPos = xPos;
this.yPos = yPos;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment