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 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)
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)
JigsawPuzzle
getPuzzle()
float
getTolerance()
protected void
placed(JigsawPuzzle.Piece piece)
called bydrop
when a piece is placedvoid
setTolerance(float tolerance)
Methods inherited from class com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Target
getActor, reset
Methods 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:
drag
in 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:
drop
in classcom.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Target
-
placed
called bydrop
when 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
- thetolerance
to set
-