[][src]Enum genie_dat::UnitType

pub enum UnitType {
    Base(Box<BaseUnitType>),
    Tree(Box<TreeUnitType>),
    Animated(Box<AnimatedUnitType>),
    Doppleganger(Box<DopplegangerUnitType>),
    Moving(Box<MovingUnitType>),
    Action(Box<ActionUnitType>),
    BaseCombat(Box<BaseCombatUnitType>),
    Missile(Box<MissileUnitType>),
    Combat(Box<CombatUnitType>),
    Building(Box<BuildingUnitType>),
}

Variants

The base unit type, for units that do not do anything.

The tree unit type.

Unit type that supports animated sprites.

Doppleganger(Box<DopplegangerUnitType>)

Unit type for the "fake" units you see in the fog of war, after the actual unit has been destroyed.

Unit type that supports movement.

Unit type that supports being tasked by a player.

BaseCombat(Box<BaseCombatUnitType>)

Unit type that supports combat.

Unit type for projectiles/missiles/arrows.

Unit type that supports combat (with additional Age of Empires specific data).

Unit type for buildings.

Implementations

impl UnitType[src]

pub fn read_from(input: impl Read, version: f32) -> Result<Self>[src]

Read a unit type from an input stream.

pub fn write_to(&self, output: impl Write, version: f32) -> Result<()>[src]

Write this unit type to an output stream.

pub fn base(&self) -> &BaseUnitType[src]

Get the base unit type properties for this unit.

pub fn animated(&self) -> Option<&AnimatedUnitType>[src]

Get the animated unit type properties for this unit.

pub fn moving(&self) -> Option<&MovingUnitType>[src]

Get the moving unit type properties for this unit.

pub fn action(&self) -> Option<&ActionUnitType>[src]

Get the action unit type properties for this unit.

Trait Implementations

impl Clone for UnitType[src]

impl Debug for UnitType[src]

impl From<ActionUnitType> for UnitType[src]

impl From<AnimatedUnitType> for UnitType[src]

impl From<BaseCombatUnitType> for UnitType[src]

impl From<BaseUnitType> for UnitType[src]

impl From<BuildingUnitType> for UnitType[src]

impl From<CombatUnitType> for UnitType[src]

impl From<DopplegangerUnitType> for UnitType[src]

impl From<MissileUnitType> for UnitType[src]

impl From<MovingUnitType> for UnitType[src]

impl From<TreeUnitType> for UnitType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.