[][src]Struct sulis_state::EntityState

pub struct EntityState {
    pub actor: ActorState,
    pub location: Location,
    pub size: Rc<ObjectSize>,
    pub sub_pos: (f32, f32),
    pub color: Color,
    pub color_sec: Color,
    pub scale: f32,
    pub listeners: ChangeListenerList<EntityState>,
    // some fields omitted
}

Fields

actor: ActorStatelocation: Locationsize: Rc<ObjectSize>sub_pos: (f32, f32)color: Colorcolor_sec: Colorscale: f32listeners: ChangeListenerList<EntityState>

Implementations

impl EntityState[src]

pub fn add_collapsed_group(&mut self, group: String)[src]

pub fn remove_collapsed_group(&mut self, group: &str)[src]

pub fn collapsed_groups(&self) -> Vec<String>[src]

pub fn unique_id(&self) -> &str[src]

pub fn index(&self) -> usize[src]

pub fn set_index(&mut self, index: usize)[src]

pub fn ai_callbacks(&self) -> Option<Rc<CallbackData>>[src]

pub fn callbacks(&self, mgr: &TurnManager) -> Vec<Rc<CallbackData>>[src]

pub fn custom_flags(&self) -> impl Iterator<Item = (&String, &String)>[src]

pub fn clear_custom_flag(&mut self, flag: &str)[src]

pub fn set_custom_flag(&mut self, flag: &str, value: &str)[src]

pub fn get_custom_flag(&self, flag: &str) -> Option<String>[src]

pub fn add_num_flag(&mut self, flag: &str, value: f32)[src]

pub fn get_num_flag(&self, flag: &str) -> f32[src]

pub fn has_custom_flag(&self, flag: &str) -> bool[src]

pub fn clear_texture_cache(&mut self)[src]

pub fn ai_group(&self) -> Option<usize>[src]

pub fn set_ai_active(&mut self, active: bool)[src]

pub fn is_ai_active(&self) -> bool[src]

pub fn show_portrait(&self) -> bool[src]

pub fn add_to_party(&mut self, show_portrait: bool)[src]

pub fn remove_from_party(&mut self)[src]

pub fn is_party_member(&self) -> bool[src]

pub fn clear_pc_vis(&mut self)[src]

pub fn pc_vis_mut(&mut self) -> &mut Vec<bool>[src]

pub fn pc_vis(&self) -> &Vec<bool>[src]

pub fn is_hostile(&self, other: &EntityState) -> bool[src]

pub fn is_friendly(&self, other: &EntityState) -> bool[src]

pub fn swap_weapon_set(entity: &Rc<RefCell<EntityState>>)[src]

pub fn can_move(&self) -> bool[src]

Returns true if this entity has enough AP to move at least 1 square, false otherwise

pub fn can_attack(&self, target: &EntityState) -> bool[src]

Returns true if this entity can attack the specified target with its current weapon, without moving

pub fn attack(
    entity: &Rc<RefCell<EntityState>>,
    target: &Rc<RefCell<EntityState>>,
    callback: Option<Box<dyn ScriptCallback>>,
    remove_ap: bool
)
[src]

pub fn add_xp(&mut self, xp: u32)[src]

pub fn remove_hp(
    entity: &Rc<RefCell<EntityState>>,
    attacker: &Rc<RefCell<EntityState>>,
    hit_kind: HitKind,
    damage: Vec<(DamageKind, u32)>
)
[src]

pub fn move_to(&mut self, x: i32, y: i32, squares: u32) -> bool[src]

pub fn size(&self) -> &str[src]

pub fn relative_points(&self) -> ObjectSizeIterator<'_>[src]

pub fn location_points(&self) -> ObjectSizeIterator<'_>[src]

pub fn points(&self, x: i32, y: i32) -> ObjectSizeIterator<'_>[src]

pub fn draw_no_pos(
    &self,
    renderer: &mut dyn GraphicsRenderer,
    offset: Offset,
    scale: Scale,
    alpha: f32
)
[src]

Trait Implementations

impl AreaDrawable for EntityState[src]

impl Locatable for EntityState[src]

impl PartialEq<EntityState> for EntityState[src]

Auto Trait Implementations

impl !RefUnwindSafe for EntityState

impl !Send for EntityState

impl !Sync for EntityState

impl Unpin for EntityState

impl !UnwindSafe for EntityState

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, 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]