Implemented conveyor item access
This commit is contained in:
@@ -6,6 +6,7 @@ import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.resource.Item;
|
||||
import io.anuke.ucore.entities.Entity;
|
||||
import io.anuke.ucore.entities.TimedEntity;
|
||||
import io.anuke.ucore.function.Callable;
|
||||
import io.anuke.ucore.graphics.Draw;
|
||||
import io.anuke.ucore.util.Mathf;
|
||||
|
||||
@@ -16,19 +17,27 @@ public class ItemAnimationEffect extends TimedEntity {
|
||||
private final Vector2 from = new Vector2();
|
||||
private final Vector2 to = new Vector2();
|
||||
private final Item item;
|
||||
private final Callable removed;
|
||||
|
||||
public Interpolation interp = Interpolation.fade;
|
||||
public float endSize = 0.8f;
|
||||
public float endSize = 0.9f;
|
||||
|
||||
public ItemAnimationEffect(Item item, float x, float y, float tox, float toy) {
|
||||
public ItemAnimationEffect(Item item, float x, float y, float tox, float toy, Callable removed) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.item = item;
|
||||
this.removed = removed;
|
||||
from.set(x, y);
|
||||
to.set(tox, toy);
|
||||
lifetime = 40f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removed() {
|
||||
super.removed();
|
||||
removed.run();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
super.update();
|
||||
|
||||
Reference in New Issue
Block a user