Multi-legged unit implementations

This commit is contained in:
Anuken
2020-07-11 22:41:26 -04:00
parent 0555e4dfa7
commit 430eef02e2
17 changed files with 1643 additions and 1312 deletions

View File

@@ -25,6 +25,7 @@ import static mindustry.Vars.*;
@Component(base = true)
abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, Itemsc, Rotc, Unitc, Weaponsc, Drawc, Boundedc, Syncc, Shieldc, Displayable{
@Import boolean hovering;
@Import float x, y, rotation, elevation, maxHealth, drag, armor, hitSize, health;
@Import boolean dead;
@Import Team team;
@@ -124,6 +125,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
this.elevation = type.flying ? 1f : type.baseElevation;
this.armor = type.armor;
this.hitSize = type.hitsize;
this.hovering = type.hovering;
if(controller == null) controller(type.createController());
if(mounts().length != type.weapons.size) setupWeapons(type);