Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package sample;
- import javafx.scene.image.Image;
- import javafx.scene.image.ImageView;
- import javafx.scene.image.WritableImage;
- public class TileView extends ImageView {
- public TileView(WritableImage image){
- super(image);
- }
- boolean rightPlace;
- //boolean justWasBlank;
- int xPos;
- int nowX;
- int yPos;
- int nowY;
- int movedLeft=0, movedRight=0, movedUp=0, movedDown=0;
- public void setX(int x) {
- this.xPos = x;
- }
- public void setY(int y){
- this.yPos = y;
- }
- public boolean isRight(){
- System.out.println(this + ": X= " + this.xPos + " Y= " + this.yPos + "\n nowX= " + this.nowX + " nowY= " + this.nowY);
- if(this.nowX == this.xPos && this.nowY == this.yPos){
- rightPlace = true;
- }else{
- rightPlace = false;
- }
- return rightPlace;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement