YAPOG  0.0.1
Yet Another Pokemon Online Game
ycl::Battle Class Reference

#include <Battle.hpp>

Inheritance diagram for ycl::Battle:
Collaboration diagram for ycl::Battle:

List of all members.

Public Member Functions

 Battle (BattleInterface &battleInterface)
virtual ~Battle ()
IDrawable members.
virtual void Draw (yap::IDrawingContext &context)
virtual bool IsVisible () const
virtual void Show (bool isVisible)
virtual void ChangeColor (const sf::Color &color)
Getters.
yap::ISpriteGetBackground () const
 Getters.
yap::ISpriteGetPlayerGround () const
yap::ISpriteGetOpponentGround () const
yap::ISpriteGetPlayerTrainerBack () const
const yap::Vector2GetPlayerGroundPosition () const
const yap::Vector2GetOpponentGroundPosition () const
const yap::Vector2GetOpponentInfoPosition () const
const yap::Vector2GetPokemonInfoPosition () const
IDrawableBattleEntityGetPlayerTeam ()
 Getters.
IDrawableBattleEntityGetOpponent ()
Setters.
void SetPlayerTeam (PokemonFighterTeam *playerTeam)
 Setters.
void SetOpponent (IDrawableBattleEntity *opponent)
- Public Member Functions inherited from yap::Battle
 Battle ()
void Init ()
void DisplayMoves ()
void DisplayTeam ()
virtual void Update (const Time &dt)
 Makes the object evolve for one frame of the game.
- Public Member Functions inherited from yap::IUpdateable
virtual ~IUpdateable ()
- Public Member Functions inherited from yap::IDrawable
virtual ~IDrawable ()

Public Attributes

Events.
yap::Event< const Battle & > OnBattleEnd

Static Public Attributes

static const yap::Vector2 DEFAULT_OPPONENT_GROUND_SPRITES_SCALE = yap::Vector2 (0.75f, 0.75f)

Protected Member Functions

virtual void HandleInit ()
virtual void HandleUpdate (const yap::Time &dt)
virtual void HandleDraw (yap::IDrawingContext &context)
virtual void HandleShow (bool isVisible)
virtual void HandleChangeColor (const sf::Color &color)
- Protected Member Functions inherited from yap::Battle
void AddPhase (const BattlePhaseState &battlePhaseState, BattlePhase *battlePhase)

Protected Attributes

bool isVisible_
sf::Color color_
BattleInterfacebattleInterface_

Static Protected Attributes

static const bool DEFAULT_VISIBLE_STATE = true
static const sf::Color DEFAULT_COLOR = sf::Color ()

Private Attributes

yap::ISpritebackground_
 General sprites.
yap::ISpriteplayerGround_
yap::ISpriteopponentGround_
yap::ISpriteplayerTrainerBack_
yap::Vector2 playerGroundPosition_
 Sprite positions.
yap::Vector2 opponentGroundPosition_
yap::Vector2 opponentInfoPosition_
yap::Vector2 pokemonInfoPosition_
IDrawableBattleEntityplayerTeam_
IDrawableBattleEntityopponent_

Detailed Description

Definition at line 21 of file Battle.hpp.


Constructor & Destructor Documentation

ycl::Battle::Battle ( BattleInterface battleInterface)

Definition at line 23 of file Battle.cpp.

ycl::Battle::~Battle ( )
virtual

Definition at line 41 of file Battle.cpp.


Member Function Documentation

void ycl::Battle::ChangeColor ( const sf::Color &  color)
virtual

Implements yap::IDrawable.

Definition at line 155 of file Battle.cpp.

Here is the call graph for this function:

void ycl::Battle::Draw ( yap::IDrawingContext context)
virtual

Implements yap::IDrawable.

Definition at line 135 of file Battle.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

yap::ISprite & ycl::Battle::GetBackground ( ) const

Getters.

Definition at line 95 of file Battle.cpp.

IDrawableBattleEntity & ycl::Battle::GetOpponent ( )
virtual

Implements yap::Battle.

Definition at line 122 of file Battle.cpp.

Here is the caller graph for this function:

yap::ISprite & ycl::Battle::GetOpponentGround ( ) const

Definition at line 101 of file Battle.cpp.

Here is the caller graph for this function:

const yap::Vector2 & ycl::Battle::GetOpponentGroundPosition ( ) const

Definition at line 110 of file Battle.cpp.

Here is the caller graph for this function:

const yap::Vector2 & ycl::Battle::GetOpponentInfoPosition ( ) const

Definition at line 113 of file Battle.cpp.

Here is the caller graph for this function:

yap::ISprite & ycl::Battle::GetPlayerGround ( ) const

Definition at line 98 of file Battle.cpp.

Here is the caller graph for this function:

const yap::Vector2 & ycl::Battle::GetPlayerGroundPosition ( ) const

Definition at line 107 of file Battle.cpp.

Here is the caller graph for this function:

IDrawableBattleEntity & ycl::Battle::GetPlayerTeam ( )
virtual

Getters.

Implements yap::Battle.

Definition at line 119 of file Battle.cpp.

Here is the caller graph for this function:

yap::ISprite & ycl::Battle::GetPlayerTrainerBack ( ) const

Definition at line 104 of file Battle.cpp.

Here is the caller graph for this function:

const yap::Vector2 & ycl::Battle::GetPokemonInfoPosition ( ) const

Definition at line 116 of file Battle.cpp.

Here is the caller graph for this function:

void ycl::Battle::HandleChangeColor ( const sf::Color &  color)
protectedvirtual

Reimplemented in ycl::WildBattle.

Definition at line 184 of file Battle.cpp.

Here is the caller graph for this function:

void ycl::Battle::HandleDraw ( yap::IDrawingContext context)
protectedvirtual

Reimplemented in ycl::WildBattle.

Definition at line 170 of file Battle.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::Battle::HandleInit ( )
protectedvirtual

Load sprites

Adjust sprites

Reimplemented from yap::Battle.

Reimplemented in ycl::WildBattle.

Definition at line 49 of file Battle.cpp.

Here is the call graph for this function:

void ycl::Battle::HandleShow ( bool  isVisible)
protectedvirtual

Reimplemented in ycl::WildBattle.

Definition at line 180 of file Battle.cpp.

Here is the caller graph for this function:

void ycl::Battle::HandleUpdate ( const yap::Time dt)
protectedvirtual

Reimplemented from yap::Battle.

Reimplemented in ycl::WildBattle.

Definition at line 162 of file Battle.cpp.

Here is the call graph for this function:

bool ycl::Battle::IsVisible ( ) const
virtual

Implements yap::IDrawable.

Definition at line 143 of file Battle.cpp.

Here is the caller graph for this function:

void ycl::Battle::SetOpponent ( IDrawableBattleEntity opponent)

Definition at line 131 of file Battle.cpp.

Here is the caller graph for this function:

void ycl::Battle::SetPlayerTeam ( PokemonFighterTeam playerTeam)

Setters.

Definition at line 126 of file Battle.cpp.

Here is the caller graph for this function:

void ycl::Battle::Show ( bool  isVisible)
virtual

Implements yap::IDrawable.

Definition at line 148 of file Battle.cpp.

Here is the call graph for this function:


Member Data Documentation

yap::ISprite* ycl::Battle::background_
private

General sprites.

Definition at line 83 of file Battle.hpp.

BattleInterface& ycl::Battle::battleInterface_
protected

Definition at line 79 of file Battle.hpp.

sf::Color ycl::Battle::color_
protected

Reimplemented in ycl::WildBattle.

Definition at line 78 of file Battle.hpp.

const sf::Color ycl::Battle::DEFAULT_COLOR = sf::Color ()
staticprotected

Reimplemented in ycl::WildBattle.

Definition at line 75 of file Battle.hpp.

const yap::Vector2 ycl::Battle::DEFAULT_OPPONENT_GROUND_SPRITES_SCALE = yap::Vector2 (0.75f, 0.75f)
static

Definition at line 59 of file Battle.hpp.

const bool ycl::Battle::DEFAULT_VISIBLE_STATE = true
staticprotected

Reimplemented in ycl::WildBattle.

Definition at line 74 of file Battle.hpp.

bool ycl::Battle::isVisible_
protected

Reimplemented in ycl::WildBattle.

Definition at line 77 of file Battle.hpp.

yap::Event<const Battle&> ycl::Battle::OnBattleEnd

Definition at line 63 of file Battle.hpp.

IDrawableBattleEntity* ycl::Battle::opponent_
private

Definition at line 96 of file Battle.hpp.

yap::ISprite* ycl::Battle::opponentGround_
private

Definition at line 85 of file Battle.hpp.

yap::Vector2 ycl::Battle::opponentGroundPosition_
private

Definition at line 90 of file Battle.hpp.

yap::Vector2 ycl::Battle::opponentInfoPosition_
private

Definition at line 91 of file Battle.hpp.

yap::ISprite* ycl::Battle::playerGround_
private

Definition at line 84 of file Battle.hpp.

yap::Vector2 ycl::Battle::playerGroundPosition_
private

Sprite positions.

Definition at line 89 of file Battle.hpp.

IDrawableBattleEntity* ycl::Battle::playerTeam_
private

Definition at line 95 of file Battle.hpp.

yap::ISprite* ycl::Battle::playerTrainerBack_
private

Definition at line 86 of file Battle.hpp.

yap::Vector2 ycl::Battle::pokemonInfoPosition_
private

Definition at line 92 of file Battle.hpp.


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