-
Notifications
You must be signed in to change notification settings - Fork 1
/
ActionManager.cpp
33 lines (25 loc) · 1.38 KB
/
ActionManager.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// --------------------------------------------------------------------------------------------------------------------------------
// DEMISERL
// Copyright 2014 Corremn
//
// $LastChangedBy$
// $LastChangedDate$
// $LastChangedRevision$
// $HeadURL: $
// --------------------------------------------------------------------------------------------------------------------------------
#include "ActionManager.h"
// -----------------------------------------------------------------------------------------------------------------------------------------------
Action* ActionManager::UpdateAction(Action* action, eAction type, int param1, int param2, int param3, int param4)
{
action->CreateAction(type);
switch (type)
{
case aMove: action->param1 = param1; action->param2 = param2; action->param3 = param3; break; //direction
case aAttack: action->param1 = param1; break; //direction
case aDrop: action->param1 = param1; break; //direction
case aFire: action->param1 = param1; action->param2 = param2; break; //direction
default: action->param1 = param1; action->param2 = param2; action->param3 = param3; action->param4 = param4; break;
}
return action;
}
// -----------------------------------------------------------------------------------------------------------------------------------------------