Added VTOL animation
This commit is contained in:
@@ -4,6 +4,7 @@ import io.anuke.mindustry.content.Items;
|
||||
import io.anuke.mindustry.content.UnitTypes;
|
||||
import io.anuke.mindustry.resource.ItemStack;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
import io.anuke.mindustry.world.blocks.types.units.ResupplyPoint;
|
||||
import io.anuke.mindustry.world.blocks.types.units.UnitFactory;
|
||||
|
||||
public class UnitBlocks {
|
||||
@@ -34,5 +35,10 @@ public class UnitBlocks {
|
||||
requirements = new ItemStack[]{
|
||||
new ItemStack(Items.stone, 1)
|
||||
};
|
||||
}},
|
||||
|
||||
resupplyPoint = new ResupplyPoint("resupplypoint"){{
|
||||
size = 2;
|
||||
itemCapacity = 30;
|
||||
}};
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package io.anuke.mindustry.content.fx;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.Colors;
|
||||
import io.anuke.mindustry.graphics.Palette;
|
||||
import io.anuke.ucore.core.Effects.Effect;
|
||||
import io.anuke.ucore.graphics.Draw;
|
||||
import io.anuke.ucore.graphics.Fill;
|
||||
@@ -36,13 +37,6 @@ public class Fx{
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
dash = new Effect(30, e -> {
|
||||
Draw.color(Color.CORAL, Color.GRAY, e.fin());
|
||||
float size = e.fout()*4f;
|
||||
Draw.rect("circle", e.x, e.y, size, size);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
spawn = new Effect(23, e -> {
|
||||
Lines.stroke(2f);
|
||||
Draw.color(Color.DARK_GRAY, Color.SCARLET, e.fin());
|
||||
|
||||
20
core/src/io/anuke/mindustry/content/fx/UnitFx.java
Normal file
20
core/src/io/anuke/mindustry/content/fx/UnitFx.java
Normal file
@@ -0,0 +1,20 @@
|
||||
package io.anuke.mindustry.content.fx;
|
||||
|
||||
import io.anuke.mindustry.graphics.Palette;
|
||||
import io.anuke.ucore.core.Effects.Effect;
|
||||
import io.anuke.ucore.graphics.Draw;
|
||||
import io.anuke.ucore.graphics.Fill;
|
||||
import io.anuke.ucore.util.Angles;
|
||||
import io.anuke.ucore.util.Mathf;
|
||||
|
||||
public class UnitFx {
|
||||
public static final Effect
|
||||
|
||||
vtolHover = new Effect(40f, e -> {
|
||||
float len = e.finpow()*10f;
|
||||
float ang = e.rotation + Mathf.randomSeedRange(e.id, 30f);
|
||||
Draw.color(Palette.lightFlame);
|
||||
Fill.circle(e.x + Angles.trnsx(ang, len), e.y + Angles.trnsy(ang, len), 2f * e.fout());
|
||||
Draw.reset();
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user