YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
Battle.hpp
Go to the documentation of this file.
1
#ifndef YAPOG_CLIENT_BATTLE_HPP
2
# define YAPOG_CLIENT_BATTLE_HPP
3
4
# include "
YAPOG/Macros.hpp
"
5
# include "
YAPOG/Game/Battle/Battle.hpp
"
6
# include "
YAPOG/Graphics/IDrawable.hpp
"
7
8
#include "
Battle/IDrawableBattleEntity.hpp
"
9
10
namespace
yap
11
{
12
class
ISprite;
13
}
14
15
namespace
ycl
16
{
17
class
BattleInterface;
18
class
PokemonFighterTeam;
19
class
PokemonFighter;
20
21
class
Battle
22
:
public
yap::Battle
23
,
public
yap::IDrawable
24
{
25
public
:
26
Battle
(
BattleInterface
& battleInterface);
27
virtual
~Battle
();
28
31
virtual
void
Draw
(
yap::IDrawingContext
& context);
32
33
virtual
bool
IsVisible
()
const
;
34
virtual
void
Show
(
bool
isVisible);
35
36
virtual
void
ChangeColor
(
const
sf::Color& color);
38
41
yap::ISprite
&
GetBackground
()
const
;
42
yap::ISprite
&
GetPlayerGround
()
const
;
43
yap::ISprite
&
GetOpponentGround
()
const
;
44
yap::ISprite
&
GetPlayerTrainerBack
()
const
;
45
const
yap::Vector2
&
GetPlayerGroundPosition
()
const
;
46
const
yap::Vector2
&
GetOpponentGroundPosition
()
const
;
47
const
yap::Vector2
&
GetOpponentInfoPosition
()
const
;
48
const
yap::Vector2
&
GetPokemonInfoPosition
()
const
;
49
IDrawableBattleEntity
&
GetPlayerTeam
();
50
IDrawableBattleEntity
&
GetOpponent
();
52
55
void
SetPlayerTeam
(
PokemonFighterTeam
* playerTeam);
56
void
SetOpponent
(
IDrawableBattleEntity
* opponent);
58
59
static
const
yap::Vector2
DEFAULT_OPPONENT_GROUND_SPRITES_SCALE
;
60
63
yap::Event<const Battle&>
OnBattleEnd
;
65
66
protected
:
67
virtual
void
HandleInit
();
68
virtual
void
HandleUpdate
(
const
yap::Time
& dt);
69
70
virtual
void
HandleDraw
(
yap::IDrawingContext
& context);
71
virtual
void
HandleShow
(
bool
isVisible);
72
virtual
void
HandleChangeColor
(
const
sf::Color& color);
73
74
static
const
bool
DEFAULT_VISIBLE_STATE
;
75
static
const
sf::Color
DEFAULT_COLOR
;
76
77
bool
isVisible_
;
78
sf::Color
color_
;
79
BattleInterface
&
battleInterface_
;
80
81
private
:
83
yap::ISprite
*
background_
;
84
yap::ISprite
*
playerGround_
;
85
yap::ISprite
*
opponentGround_
;
86
yap::ISprite
*
playerTrainerBack_
;
87
89
yap::Vector2
playerGroundPosition_
;
90
yap::Vector2
opponentGroundPosition_
;
91
yap::Vector2
opponentInfoPosition_
;
92
yap::Vector2
pokemonInfoPosition_
;
93
94
// Fighters
95
IDrawableBattleEntity
*
playerTeam_
;
96
IDrawableBattleEntity
*
opponent_
;
97
};
98
}
// namespace ycl
99
100
#endif // YAPOG_CLIENT_WILDBATTLE_HPP
YAPOG.Client
include
Battle
Battle.hpp
Generated on Mon Sep 17 2012 22:24:22 for YAPOG by
1.8.1.1