Peoplemon  0.1.0
Peoplemon 3 game source documentation
Classes | Public Types | Public Member Functions | List of all members
core::battle::view::MoveAnimation Class Reference

Utility for rendering move animations. More...

#include <MoveAnimation.hpp>

Public Types

enum  User { Player , Opponent }
 Which peoplemon is using the move. More...
 

Public Member Functions

 MoveAnimation (bl::engine::Engine &engine)
 Construct a new Move Animation helper. More...
 
void init (bl::rc::scene::CodeScene *scene)
 Initializes the animations. More...
 
void ensureLoaded (const pplmn::BattlePeoplemon &player, const pplmn::BattlePeoplemon &opponent)
 Loads the move animations into the resource manager for the given peoplemon. More...
 
void playAnimation (User user, pplmn::MoveId move)
 Begins playing the given move animation. More...
 
bool completed () const
 Returns whether or not the animation has completed playing. More...
 
void renderBackground (bl::rc::scene::CodeScene::RenderContext &ctx)
 Renders the move animation background. More...
 
void renderForeground (bl::rc::scene::CodeScene::RenderContext &ctx)
 Renders the move animation foreground. More...
 

Detailed Description

Utility for rendering move animations.

Definition at line 21 of file MoveAnimation.hpp.

Member Enumeration Documentation

◆ User

Which peoplemon is using the move.

Enumerator
Player 
Opponent 

Definition at line 26 of file MoveAnimation.hpp.

Constructor & Destructor Documentation

◆ MoveAnimation()

core::battle::view::MoveAnimation::MoveAnimation ( bl::engine::Engine &  engine)

Construct a new Move Animation helper.

Parameters
engineThe game engine instance

Definition at line 25 of file MoveAnimation.cpp.

Member Function Documentation

◆ completed()

bool core::battle::view::MoveAnimation::completed ( ) const

Returns whether or not the animation has completed playing.

Definition at line 69 of file MoveAnimation.cpp.

◆ ensureLoaded()

void core::battle::view::MoveAnimation::ensureLoaded ( const pplmn::BattlePeoplemon player,
const pplmn::BattlePeoplemon opponent 
)

Loads the move animations into the resource manager for the given peoplemon.

Parameters
playerThe player's peoplemon that is out
opponentThe other peoplemon that is out

Definition at line 32 of file MoveAnimation.cpp.

◆ init()

void core::battle::view::MoveAnimation::init ( bl::rc::scene::CodeScene *  scene)

Initializes the animations.

Parameters
sceneThe scene to use

Definition at line 30 of file MoveAnimation.cpp.

◆ playAnimation()

void core::battle::view::MoveAnimation::playAnimation ( User  user,
pplmn::MoveId  move 
)

Begins playing the given move animation.

Parameters
userThe peoplemon using the move
moveThe move being used

Definition at line 49 of file MoveAnimation.cpp.

◆ renderBackground()

void core::battle::view::MoveAnimation::renderBackground ( bl::rc::scene::CodeScene::RenderContext &  ctx)

Renders the move animation background.

Parameters
ctxThe render context

Definition at line 71 of file MoveAnimation.cpp.

◆ renderForeground()

void core::battle::view::MoveAnimation::renderForeground ( bl::rc::scene::CodeScene::RenderContext &  ctx)

Renders the move animation foreground.

Parameters
ctxThe render context

Definition at line 77 of file MoveAnimation.cpp.


The documentation for this class was generated from the following files: