pub struct ActiveFight {Show 13 fields
pub id: Uuid,
pub fight_id: FightTemplateId,
pub current_wave: i64,
pub player_id: EntityId,
pub party_player_id: Option<EntityId>,
pub entities: Vec<Entity>,
pub fight_stopped: bool,
pub fight_ended: bool,
pub max_duration_ticks: u64,
pub dungeon: Option<ActiveDungeon>,
pub paused: bool,
pub pet_combat_state: Option<ActivePetAbility>,
pub leader_pet_template_id: Option<PetId>,
}Fields§
§id: Uuid§fight_id: FightTemplateId§current_wave: i64§player_id: EntityId§party_player_id: Option<EntityId>§entities: Vec<Entity>§fight_stopped: bool§fight_ended: bool§max_duration_ticks: u64§dungeon: Option<ActiveDungeon>§paused: bool§pet_combat_state: Option<ActivePetAbility>§leader_pet_template_id: Option<PetId>Implementations§
Source§impl ActiveFight
impl ActiveFight
pub fn get_player(&self) -> Option<&Entity>
pub fn get_player_mut(&mut self) -> Option<&mut Entity>
pub fn get_party_player(&self) -> Option<&Entity>
pub fn get_party_player_mut(&mut self) -> Option<&mut Entity>
pub fn get_enemies_amount(&self) -> usize
Trait Implementations§
Source§impl Clone for ActiveFight
impl Clone for ActiveFight
Source§fn clone(&self) -> ActiveFight
fn clone(&self) -> ActiveFight
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CustomType for ActiveFight
impl CustomType for ActiveFight
Source§fn build(builder: TypeBuilder<'_, Self>)
fn build(builder: TypeBuilder<'_, Self>)
Builds the custom type for use with the [
Engine]. Read moreSource§impl Debug for ActiveFight
impl Debug for ActiveFight
Source§impl Default for ActiveFight
impl Default for ActiveFight
Source§fn default() -> ActiveFight
fn default() -> ActiveFight
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ActiveFight
impl<'de> Deserialize<'de> for ActiveFight
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for ActiveFight
impl JsonSchema for ActiveFight
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ActiveFight
impl PartialEq for ActiveFight
Source§impl Serialize for ActiveFight
impl Serialize for ActiveFight
Source§impl Tsify for ActiveFight
impl Tsify for ActiveFight
const DECL: &'static str = "export interface ActiveFight {\n id: Uuid;\n fight_id: FightTemplateId;\n current_wave: number;\n player_id: EntityId;\n party_player_id: EntityId | null;\n entities: Entity[];\n fight_stopped: boolean;\n fight_ended: boolean;\n max_duration_ticks: number;\n dungeon: ActiveDungeon | null;\n paused: boolean;\n pet_combat_state: ActivePetAbility | null;\n leader_pet_template_id: PetId | null;\n}"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
fn from_js<T>(js: T) -> Result<Self, Error>
impl Eq for ActiveFight
impl StructuralPartialEq for ActiveFight
Auto Trait Implementations§
impl Freeze for ActiveFight
impl RefUnwindSafe for ActiveFight
impl Send for ActiveFight
impl Sync for ActiveFight
impl Unpin for ActiveFight
impl UnwindSafe for ActiveFight
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more