wip
This commit is contained in:
@@ -24,7 +24,7 @@ import static arc.math.Angles.*;
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
public class UnitTypes implements ContentList{
|
||||
//region definitions
|
||||
//region standard
|
||||
|
||||
//mech
|
||||
public static @EntityDef({Unitc.class, Mechc.class}) UnitType mace, dagger, crawler, fortress, scepter, reign, vela;
|
||||
@@ -67,6 +67,12 @@ public class UnitTypes implements ContentList{
|
||||
|
||||
//endregion
|
||||
|
||||
//region neoplasm
|
||||
|
||||
public static @EntityDef({Unitc.class, Crawlc.class}) UnitType scuttler;
|
||||
|
||||
//endregion
|
||||
|
||||
@Override
|
||||
public void load(){
|
||||
//region ground attack
|
||||
@@ -2394,6 +2400,16 @@ public class UnitTypes implements ContentList{
|
||||
}
|
||||
};
|
||||
|
||||
//endregion
|
||||
//region neoplasm
|
||||
|
||||
scuttler = new UnitType("scuttler"){{
|
||||
hitSize = 30f;
|
||||
omniMovement = false;
|
||||
rotateSpeed = 1f;
|
||||
drawCell = false;
|
||||
}};
|
||||
|
||||
//endregion
|
||||
}
|
||||
}
|
||||
|
||||
48
core/src/mindustry/entities/comp/CrawlComp.java
Normal file
48
core/src/mindustry/entities/comp/CrawlComp.java
Normal file
@@ -0,0 +1,48 @@
|
||||
package mindustry.entities.comp;
|
||||
|
||||
import arc.math.geom.*;
|
||||
import mindustry.ai.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.entities.EntityCollisions.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.world.blocks.environment.*;
|
||||
|
||||
//TODO
|
||||
@Component
|
||||
abstract class CrawlComp implements Posc, Rotc, Hitboxc, Unitc{
|
||||
@Import float x, y, speedMultiplier;
|
||||
@Import UnitType type;
|
||||
@Import Vec2 vel;
|
||||
|
||||
//TODO segments
|
||||
float segmentRot;
|
||||
float crawlTime;
|
||||
|
||||
@Replace
|
||||
@Override
|
||||
public SolidPred solidity(){
|
||||
return EntityCollisions::legsSolid;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Replace
|
||||
public int pathType(){
|
||||
return Pathfinder.costLegs;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Replace
|
||||
public float floorSpeedMultiplier(){
|
||||
Floor on = isFlying() ? Blocks.air.asFloor() : floorOn();
|
||||
//TODO take into account extra blocks
|
||||
return on.speedMultiplier * speedMultiplier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(){
|
||||
crawlTime += vel.len();
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import static mindustry.entities.Puddles.*;
|
||||
|
||||
public class CellLiquid extends Liquid{
|
||||
public Color colorFrom = Color.white.cpy(), colorTo = Color.white.cpy();
|
||||
public int cells = 8;
|
||||
|
||||
public CellLiquid(String name, Color color){
|
||||
super(name, color);
|
||||
@@ -33,7 +34,7 @@ public class CellLiquid extends Liquid{
|
||||
float length = Math.max(f, 0.3f) * 9f;
|
||||
|
||||
rand.setSeed(id);
|
||||
for(int i = 0; i < 8; i++){
|
||||
for(int i = 0; i < cells; i++){
|
||||
Tmp.v1.trns(rand.random(360f), rand.random(length));
|
||||
float vx = x + Tmp.v1.x, vy = y + Tmp.v1.y;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user