Package mindustry.entities.comp
Class WorldLabelComp
java.lang.Object
mindustry.entities.comp.WorldLabelComp
- All Implemented Interfaces:
arc.math.geom.Position,mindustry.gen.Drawc,mindustry.gen.Entityc,mindustry.gen.Posc,mindustry.gen.Syncc
public abstract class WorldLabelComp
extends Object
implements mindustry.gen.Posc, mindustry.gen.Drawc, mindustry.gen.Syncc
Component/entity for labels in world space. Useful for servers. Does not save in files - create only on world load.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final bytestatic final bytestatic final bytestatic final bytestatic final bytebyteFlags are packed into a byte for sync efficiency; see the flag static values.floatfloat -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface mindustry.gen.Entityc
add, afterRead, afterReadAll, as, beforeWrite, classId, id, id, isAdded, isLocal, isRemote, read, self, serialize, writeMethods inherited from interface mindustry.gen.Posc
blockOn, buildOn, floorOn, getX, getY, onSolid, set, set, tileOn, tileX, tileY, trns, trns, x, x, y, yMethods inherited from interface arc.math.geom.Position
angleTo, angleTo, dst, dst, dst2, dst2, within, withinMethods inherited from interface mindustry.gen.Syncc
afterSync, handleSyncHidden, interpolate, isSyncHidden, lastUpdated, lastUpdated, readSync, readSyncManual, remove, snapInterpolation, snapSync, update, updateSpacing, updateSpacing, writeSync, writeSyncManual
-
Field Details
-
flagBackground
public static final byte flagBackground- See Also:
-
flagOutline
public static final byte flagOutline- See Also:
-
flagAlignLeft
public static final byte flagAlignLeft- See Also:
-
flagAlignRight
public static final byte flagAlignRight- See Also:
-
flagAutoscale
public static final byte flagAutoscale- See Also:
-
text
-
fontSize
public float fontSize -
z
public float z -
flags
public byte flagsFlags are packed into a byte for sync efficiency; see the flag static values.
-
-
Constructor Details
-
WorldLabelComp
public WorldLabelComp()
-
-
Method Details
-
clipSize
public float clipSize()- Specified by:
clipSizein interfacemindustry.gen.Drawc
-
draw
public void draw()- Specified by:
drawin interfacemindustry.gen.Drawc
-
drawAt
public static void drawAt(String text, float x, float y, float layer, int flags, float fontSize, int align, int lineAlign) -
hide
public void hide()This MUST be called instead of remove()!
-