YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
WildBattle.cpp
Go to the documentation of this file.
1
#include "
YAPOG/Graphics/Game/Sprite/Sprite.hpp
"
2
3
#include "
Battle/WildBattle.hpp
"
4
#include "
Battle/Phase/BeginWildBattlePhase.hpp
"
5
#include "Battle/Phase/SelectionPhase.hpp"
6
#include "Battle/Phase/EndPokemonSwitchPhase.hpp"
7
#include "Battle/Phase/RunWildBattlePhase.hpp"
8
#include "Battle/Battle.hpp"
9
#include "
Battle/BattleInterface.hpp
"
10
11
namespace
ycl
12
{
13
WildBattle::WildBattle
(
BattleInterface
& battleInterface)
14
:
Battle
(battleInterface)
15
{
16
// DO NOT INIT BATTLE PHASE HERE !
17
}
18
19
WildBattle::~WildBattle
()
20
{
21
}
22
23
void
WildBattle::HandleInit
()
24
{
25
Battle::HandleInit
();
26
27
BeginWildBattlePhase
* beginWildBattlePhase =
28
new
BeginWildBattlePhase
(*
this
,
battleInterface_
);
29
EndPokemonSwitchPhase
* switchPhase =
new
EndPokemonSwitchPhase
(*
this
,
battleInterface_
);
30
SelectionPhase
* selectionPhase =
new
SelectionPhase
(*
this
,
battleInterface_
);
31
RunWildBattlePhase
* runPhase =
new
RunWildBattlePhase
(*
this
,
battleInterface_
);
32
33
beginWildBattlePhase->
Init
();
34
selectionPhase->
Init
();
35
36
AddPhase
(
yap::BattlePhaseState::BeginBattle
, beginWildBattlePhase);
37
AddPhase
(
yap::BattlePhaseState::Switch
, switchPhase);
38
AddPhase
(
yap::BattlePhaseState::Selection
, selectionPhase);
39
AddPhase
(
yap::BattlePhaseState::Run
, runPhase);
40
}
41
42
void
WildBattle::HandleUpdate
(
const
yap::Time
& dt)
43
{
44
Battle::HandleUpdate
(dt);
45
}
46
47
void
WildBattle::HandleDraw
(
yap::IDrawingContext
& context)
48
{
49
Battle::HandleDraw
(context);
50
}
51
52
void
WildBattle::HandleShow
(
bool
isVisible)
53
{
54
}
55
56
void
WildBattle::HandleChangeColor
(
const
sf::Color& color)
57
{
58
}
59
60
}
// namespace yap
YAPOG.Client
src
Battle
WildBattle.cpp
Generated on Mon Sep 17 2012 22:24:21 for YAPOG by
1.8.1.1