Switched to unit UI icons for minimap/players
This commit is contained in:
@@ -43,6 +43,12 @@ abstract class BlockUnitComp implements Unitc{
|
||||
return tile.block.fullIcon;
|
||||
}
|
||||
|
||||
@Replace
|
||||
@Override
|
||||
public TextureRegion uiIcon(){
|
||||
return tile.block.uiIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void killed(){
|
||||
tile.kill();
|
||||
|
||||
@@ -72,9 +72,9 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
|
||||
|
||||
public TextureRegion icon(){
|
||||
//display default icon for dead players
|
||||
if(dead()) return core() == null ? UnitTypes.alpha.fullIcon : ((CoreBlock)bestCore().block).unitType.fullIcon;
|
||||
if(dead()) return core() == null ? UnitTypes.alpha.uiIcon : ((CoreBlock)bestCore().block).unitType.uiIcon;
|
||||
|
||||
return unit.icon();
|
||||
return unit.uiIcon();
|
||||
}
|
||||
|
||||
public boolean displayAmmo(){
|
||||
|
||||
@@ -671,6 +671,11 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||
return type.fullIcon;
|
||||
}
|
||||
|
||||
/** @return a preview UI icon for this unit. */
|
||||
public TextureRegion uiIcon(){
|
||||
return type.uiIcon;
|
||||
}
|
||||
|
||||
/** Actually destroys the unit, removing it and creating explosions. **/
|
||||
public void destroy(){
|
||||
if(!isAdded() || !type.killable) return;
|
||||
|
||||
Reference in New Issue
Block a user