Struct sc2::data::Unit [] [src]

pub struct Unit { /* fields omitted */ }

a unit (could be structure, a worker, or military)

Methods

impl Unit
[src]

[src]

mark this unit as dead

[src]

set the step where the unit was last seen

[src]

whether the unit is shown on screen or not

[src]

relationship of the unit to this player

[src]

a unique id for the instance of a unit

[src]

the type of unit

[src]

which player owns this unit

[src]

position of the unit in the world

[src]

just the x and y coordinates of the unit position

[src]

direction the unit faces in radians

[src]

radius of the unit

[src]

gives progress under construction (range [0.0, 1.0] where 1.0 is done)

[src]

whether the unit is cloaked

[src]

range of detector for detector units

[src]

range of radar for radar units

[src]

whether this unit is currently selected

[src]

whether this unit is visible and within the camera frustum

[src]

whether this unit is detected by a sensor tower

[src]

health of the unit (not set for snapshots)

[src]

max health of the unit (not set for snapshots)

[src]

shield of the unit (not set for snapshots)

[src]

energy of the unit (not set for snapshots)

[src]

amount of minerals if unit is a mineral field (not set for snapshot)

[src]

amount of vespene if unit is a geyser (not set for snapshots)

[src]

whether the unit is flying (not set for snapshots)

[src]

whether the unit is burrowed (not set for snapshots)

[src]

time remaining for a weapon on cooldown (not set for snapshots)

[src]

orders on this unit (only valid for this player's units)

[src]

addon like a tech lab or reactor (only valid for this player's units)

[src]

passengers in this transport (only valid for this player's units)

[src]

number of cargo slots used (only valid for this player's units)

[src]

max number of cargo slots (only valid for this player's units)

[src]

number of harvesters associated with town hall

[src]

number of harvesters that can be assigned to a town hall

[src]

target unit of a unit (only valid for this player's units)

[src]

buffs on this unit (only valid for this player's units)

[src]

whether this unit is powered by a pylon

[src]

whether this unit is alive or not

[src]

the last time the unit was seen

Trait Implementations

impl Debug for Unit
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for Unit
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Unit

impl Sync for Unit