Package mindustry.world.blocks.payloads
Class UnitPayload
java.lang.Object
mindustry.world.blocks.payloads.UnitPayload
-
Field Summary
Modifier and TypeFieldDescriptionstatic final float
float
mindustry.gen.Unit
Fields inherited from interface mindustry.world.blocks.payloads.Payload
payloadBlock, payloadUnit
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfloat
content()
void
draw()
draws this payload at a position.void
drawShadow
(float alpha) boolean
dump()
icon()
float
rotation()
void
set
(float x, float y, float rotation) sets this payload's position on the map.void
showOverlay
(TextureRegion icon) Flashes a red overlay region.void
Flashes a red overlay region.float
size()
void
update
(mindustry.gen.Unit unitHolder, mindustry.gen.Building buildingHolder) update this payload inside a container unit or building.void
writes the payload for saving.float
x()
float
y()
-
Field Details
-
overlayDuration
public static final float overlayDuration- See Also:
-
unit
public mindustry.gen.Unit unit -
overlayTime
public float overlayTime -
overlayRegion
-
-
Constructor Details
-
UnitPayload
public UnitPayload(mindustry.gen.Unit unit)
-
-
Method Details
-
showOverlay
Flashes a red overlay region. -
showOverlay
Flashes a red overlay region. -
update
public void update(@Nullable mindustry.gen.Unit unitHolder, @Nullable mindustry.gen.Building buildingHolder) Description copied from interface:Payload
update this payload inside a container unit or building. either can be null. -
content
-
requirements
- Specified by:
requirements
in interfacePayload
- Returns:
- the items needed to make this payload; may be empty.
-
buildTime
public float buildTime() -
write
Description copied from interface:Payload
writes the payload for saving. -
set
public void set(float x, float y, float rotation) Description copied from interface:Payload
sets this payload's position on the map. -
x
public float x() -
y
public float y() -
rotation
public float rotation() -
size
public float size() -
dump
public boolean dump() -
drawShadow
public void drawShadow(float alpha) - Specified by:
drawShadow
in interfacePayload
-
draw
public void draw()Description copied from interface:Payload
draws this payload at a position. -
icon
-