YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
BaseMapEventAction.cpp
Go to the documentation of this file.
1
#include "
YAPOG/Game/World/Map/BaseMapEventAction.hpp
"
2
#include "
YAPOG/Game/World/Map/DynamicWorldObject.hpp
"
3
4
namespace
yap
5
{
6
const
MapEventActionType
BaseMapEventAction::DEFAULT_CONTEXT_TYPE
=
7
MapEventActionType::In
;
8
9
BaseMapEventAction::BaseMapEventAction
()
10
: contextType_ (DEFAULT_CONTEXT_TYPE)
11
, args_ (nullptr)
12
{
13
}
14
15
BaseMapEventAction::~BaseMapEventAction
()
16
{
17
}
18
19
BaseMapEventAction::BaseMapEventAction
(
const
BaseMapEventAction
& copy)
20
: contextType_ (copy.contextType_)
21
, args_ (nullptr)
22
{
23
}
24
25
bool
BaseMapEventAction::Execute
(
26
MapEventActionType
contextType,
27
DynamicWorldObject
& trigger,
28
MapEventArgs
& args)
29
{
30
contextType_
= contextType;
31
32
args_
= &args;
33
34
trigger.
Accept
(*
this
);
35
36
return
HandleExecute
(args);
37
}
38
39
void
BaseMapEventAction::VisitDynamicWorldObject
(
40
DynamicWorldObject
& visitable)
41
{
42
}
43
44
void
BaseMapEventAction::VisitCharacter
(
Character
& visitable)
45
{
46
}
47
48
void
BaseMapEventAction::VisitPlayer
(
IPlayer
& visitable)
49
{
50
}
51
52
void
BaseMapEventAction::VisitTeleporter
(
Teleporter
& visitable)
53
{
54
}
55
56
void
BaseMapEventAction::VisitDestructibleObject
(
57
DestructibleObject
& visitable)
58
{
59
}
60
61
void
BaseMapEventAction::VisitBattleSpawnerArea
(
62
BattleSpawnerArea
& visitable)
63
{
64
}
65
66
MapEventActionType
BaseMapEventAction::GetContextType
()
const
67
{
68
return
contextType_
;
69
}
70
71
MapEventArgs
&
BaseMapEventAction::GetArgs
()
72
{
73
return
*
args_
;
74
}
75
76
bool
BaseMapEventAction::HandleExecute
(
MapEventArgs
& args)
77
{
78
return
true
;
79
}
80
}
// namespace yap
YAPOG
src
YAPOG
Game
World
Map
BaseMapEventAction.cpp
Generated on Mon Sep 17 2012 22:24:25 for YAPOG by
1.8.1.1