Struct rpg::world::two_dimensional::Field [] [src]

pub struct Field {
    pub field_type: FieldType,
    pub height: i32,
    pub contained_entity_id: Option<usize>,
}

A single field of the world

Fields

The type of the field

The height of the field. Used for collision detection

The id if the contained entity (optional)

Methods

impl Field
[src]

Creates a new instance of Field

A builder method for adding an entity to a field

A builder method for setting the height of a field

Trait Implementations

impl Encodable for Field
[src]

Serialize a value using an Encoder.

impl Decodable for Field
[src]

Deserialize a value using a Decoder.

impl Clone for Field
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more