pub struct AnimationLibrary;Expand description
Pre-built animation library for the Chaos RPG.
Implementations§
Source§impl AnimationLibrary
impl AnimationLibrary
Sourcepub fn player_idle() -> SpriteAnimation
pub fn player_idle() -> SpriteAnimation
Player idle: 2-frame breathing cycle.
Sourcepub fn player_attack() -> SpriteAnimation
pub fn player_attack() -> SpriteAnimation
Player attack: 4-frame swing animation.
Sourcepub fn player_cast() -> SpriteAnimation
pub fn player_cast() -> SpriteAnimation
Player cast: 3-frame spell casting.
Sourcepub fn player_hurt() -> SpriteAnimation
pub fn player_hurt() -> SpriteAnimation
Player hurt: 2-frame recoil.
Sourcepub fn player_defend() -> SpriteAnimation
pub fn player_defend() -> SpriteAnimation
Player defend: 2-frame block.
Sourcepub fn enemy_idle() -> SpriteAnimation
pub fn enemy_idle() -> SpriteAnimation
Enemy idle: 2-frame shift.
Sourcepub fn enemy_attack() -> SpriteAnimation
pub fn enemy_attack() -> SpriteAnimation
Enemy attack: 3-frame lunge.
Sourcepub fn enemy_death() -> SpriteAnimation
pub fn enemy_death() -> SpriteAnimation
Enemy death: 4-frame dissolution.
Sourcepub fn boss_idle(boss_name: &str) -> SpriteAnimation
pub fn boss_idle(boss_name: &str) -> SpriteAnimation
Get idle animation for a boss by name.
Sourcepub fn boss_attack(boss_name: &str) -> SpriteAnimation
pub fn boss_attack(boss_name: &str) -> SpriteAnimation
Get attack animation for a boss by name.
Sourcepub fn player_animator() -> SpriteAnimator
pub fn player_animator() -> SpriteAnimator
Build a complete SpriteAnimator with all player animations and state machine.
Sourcepub fn enemy_animator() -> SpriteAnimator
pub fn enemy_animator() -> SpriteAnimator
Build a standard enemy animator.
Sourcepub fn boss_animator(boss_name: &str) -> SpriteAnimator
pub fn boss_animator(boss_name: &str) -> SpriteAnimator
Build a boss animator for a specific boss type.
Auto Trait Implementations§
impl Freeze for AnimationLibrary
impl RefUnwindSafe for AnimationLibrary
impl Send for AnimationLibrary
impl Sync for AnimationLibrary
impl Unpin for AnimationLibrary
impl UnsafeUnpin for AnimationLibrary
impl UnwindSafe for AnimationLibrary
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.