[−][src]Module pokemon_rust::entities::character

Types related to character entities.

Structs

AllowedMovements

A component representing which movements a character can do and their corresponding properties (sprite sheet and velocity).

Character

A component representing the core aspects of a character.

CharacterId

Represents the globally unique ID of a character.

CharacterMovement

Represents a character movement in progress.

MovementData

Represents the properties of a movement kind for a character.

NpcBuilder

Ergonomic type for representing an NPC under construction.

PendingInteraction

A resource that's present in the world whenever there's a pending interaction with an NPC.

PlayerEntity

Resource that stores the entity corresponding to the human player.

SerializableCharacter

Represents the serializable version of a character, loaded from its corresponding character.ron file.

SerializableMovementData

Serializable version of each kind of movement that a character can do.

Enums

CharacterAnimation

The kind of animation that a character is currently in.

MovementType

The kind of movement that characters can do. Note that not all characters can do all of these. NPCs can usually do just one.

StepKind

The kind of step that a character can do (left or right).

Constants

_IMPL_DESERIALIZE_FOR_CharacterId
_IMPL_DESERIALIZE_FOR_MovementType
_IMPL_DESERIALIZE_FOR_SerializableCharacter
_IMPL_DESERIALIZE_FOR_SerializableMovementData
_IMPL_SERIALIZE_FOR_CharacterId
_IMPL_SERIALIZE_FOR_MovementType
_IMPL_SERIALIZE_FOR_SerializableCharacter
_IMPL_SERIALIZE_FOR_SerializableMovementData

Functions

add_idle_animations

Internal function for adding idle animations to the animation table of a character.

add_run_animations

Internal function for adding running animations to the animation table of a character.

add_walk_animations

Internal function for adding walking animations to the animation table of a character.

initialise_npc

Inserts an NPC into the world according to the data present in a NpcBuilder and returns its Character ID.

initialise_player

Inserts a human player into the world and returns its corresponding Entity.

read_character_file

Internal function for reading the character.ron of a character.