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

pub struct Unit { /* fields omitted */ }

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

Methods

impl Unit
[src]

Mark this unit as dead.

Set the step where the unit was last seen.

Whether the unit is shown on screen or not.

Relationship of the unit to this player.

A unique id for the instance of a unit.

The type of unit.

Which player owns this unit.

Position of the unit in the world.

Just the x and y coordinates of the unit position.

Direction the unit faces in radians.

Radius of the unit.

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

Whether the unit is cloaked.

Range of detector for detector units.

Range of radar for radar units.

Whether this unit is currently selected.

Whether this unit is visible and within the camera frustum.

Whether this unit is detected by a sensor tower.

Health of the unit (not set for snapshots).

Max health of the unit (not set for snapshots).

Shield of the unit (not set for snapshots).

Energy of the unit (not set for snapshots).

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

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

Whether the unit is flying (not set for snapshots).

Whether the unit is burrowed (not set for snapshots).

Time remaining for a weapon on cooldown (not set for snapshots).

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

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

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

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

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

Number of harvesters associated with town hall.

Number of harvesters that can be assigned to a town hall.

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

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

Whether this unit is powered by a pylon.

Whether this unit is alive or not.

The last time the unit was seen.

Trait Implementations

impl Debug for Unit
[src]

Formats the value using the given formatter. Read more

impl Clone for Unit
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Unit

impl Sync for Unit