Class JigsawPuzzle.Target
java.lang.Object
com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Target
net.dermetfan.gdx.scenes.scene2d.ui.JigsawPuzzle.Target
- Enclosing class:
- JigsawPuzzle
public class JigsawPuzzle.Target
extends com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Target
- Since:
- 0.10.0
-
Constructor Summary
Constructors Constructor Description Target(com.badlogic.gdx.scenes.scene2d.Group group, float tolerance) -
Method Summary
Modifier and Type Method Description booleandrag(com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Source source, com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Payload payload, float x, float y, int pointer)voiddrop(com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Source source, com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Payload payload, float x, float y, int pointer)JigsawPuzzlegetPuzzle()floatgetTolerance()protected voidplaced(JigsawPuzzle.Piece piece)called bydropwhen a piece is placedvoidsetTolerance(float tolerance)Methods inherited from class com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Target
getActor, resetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Target
public Target(com.badlogic.gdx.scenes.scene2d.Group group, float tolerance)- Parameters:
tolerance- thetolerance
-
-
Method Details
-
drag
public boolean drag(com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Source source, com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Payload payload, float x, float y, int pointer)- Specified by:
dragin classcom.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Target
-
drop
public void drop(com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Source source, com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Payload payload, float x, float y, int pointer)- Specified by:
dropin classcom.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Target
-
placed
called bydropwhen a piece is placed- Parameters:
piece- the placed piece
-
getPuzzle
- Returns:
- the enclosing JigsawPuzzle instance
-
getTolerance
public float getTolerance()- Returns:
- the
tolerance
-
setTolerance
public void setTolerance(float tolerance)- Parameters:
tolerance- thetoleranceto set
-