Tool preview is shown when finger holding.

This feature will be deleted on the next commit, because it slows down on slow mobiles and is not really seen
This commit is contained in:
= 2017-10-02 23:13:24 +02:00
parent 2e4b5b7f8f
commit 6c49f21b74
4 changed files with 26 additions and 2 deletions

View File

@ -260,7 +260,7 @@
<obstacleData floating="false" moving="false" deadly="false" leftEdge="6.196662" rightEdge="6.496662" height="0.662" y="-0.26900002">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="6.183329" rightEdge="6.4833293" height="1.019" y="0.9266667">
<obstacleData floating="true" moving="false" deadly="false" leftEdge="6.1966624" rightEdge="6.4966626" height="1.019" y="1.0333333">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="14.57353" rightEdge="17.57353" height="0.5" y="-0.9733329">

View File

@ -260,7 +260,7 @@
<obstacleData floating="false" moving="false" deadly="false" leftEdge="6.196662" rightEdge="6.496662" height="0.662" y="-0.26900002">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="6.183329" rightEdge="6.4833293" height="1.019" y="0.9266667">
<obstacleData floating="true" moving="false" deadly="false" leftEdge="6.1966624" rightEdge="6.4966626" height="1.019" y="1.0333333">
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
</obstacleData>
<obstacleData floating="true" moving="false" deadly="false" leftEdge="14.57353" rightEdge="17.57353" height="0.5" y="-0.9733329">

View File

@ -0,0 +1,24 @@
package de.frajul.endlessroll.entities.tools;
import de.frajul.endlessroll.data.Vector;
import de.frajul.endlessroll.entities.Entity;
/**
* Created by Julian on 22.09.2017.
*/
public class ToolPreview extends Entity {
public ToolPreview() {
super(null, new Vector(), 0, 0);
super.setAlpha(0.5f);
super.setVisible(false);
}
public void showTool(ToolType toolType) {
super.setVisible(true);
super.setTexture(toolType.getToolTexture());
super.setWidth(toolType.getWidth());
super.setHeight(toolType.getHeight());
}
}