-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
181 changed files
with
13,862 additions
and
19,246 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "Condition.h" | ||
|
||
Condition::Condition(ConditionPrototype* prototype, Character* inflictor) | ||
{ | ||
this->prototype = prototype; | ||
this->inflictor = inflictor; | ||
|
||
totalTime = 0.0f; | ||
tickTime = 0.0f; | ||
} | ||
|
||
Condition::~Condition() | ||
{ | ||
//dtor | ||
} | ||
|
||
void Condition::initialize() | ||
{ | ||
prototype->setParamsFromCharacter(inflictor); | ||
|
||
totalTime = prototype->getDuration(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#ifndef CONDITION_H | ||
#define CONDITION_H | ||
|
||
#include <SoDlib.h> | ||
|
||
class Condition | ||
{ | ||
public: | ||
Condition(ConditionPrototype* prototype, Character* inflictor, Character* bearer); | ||
virtual ~Condition(); | ||
|
||
void initialize(); | ||
|
||
void update(float dt); | ||
|
||
float getTime(); | ||
protected: | ||
ConditionPrototype* prototype; | ||
Character* inflictor; Character* bearer; | ||
|
||
float totalTime, tickTime, interval; | ||
private: | ||
}; | ||
|
||
#endif // CONDITION_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#ifndef CONDITION_PROTOTYPE_H | ||
#define CONDITION_PROTOTYPE_H | ||
|
||
#include <SoDlib.h> | ||
|
||
const int CONDITION_TYPE_DAMAGE = 1; | ||
const int CONDITION_TYPE_STUN = 2; | ||
|
||
const int CONDITION_PROTOTYPE_PARAM_DAMAGE = 0; | ||
|
||
const int CONDITION_PROTOTYPE_PARAMS_COUNT = 1; | ||
|
||
static const char* CONDITION_PROTOTYPE_PARAM_NAMES[CONDITION_PROTOTYPE_PARAMS_COUNT] = { | ||
"damage" | ||
}; | ||
|
||
class ConditionPrototype | ||
{ | ||
public: | ||
ConditionPrototype(); | ||
virtual ~ConditionPrototype(); | ||
|
||
void loadFromXml(TiXmlElement* xml); | ||
|
||
void setParam(int index, float value); | ||
void setParamsFromCharacter(Character* character); | ||
|
||
int getType(); | ||
float getValue(), getDuration(), getInterval(); | ||
|
||
Condition* spawnCondition(Character* inflictor, Character* bearer); | ||
protected: | ||
int type; | ||
float* params; | ||
mu::Parser valueParser, durationParser, intervalParser; | ||
private: | ||
}; | ||
|
||
#endif // CONDITION_PROTOTYPE_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#ifndef EFFECTACTION_H | ||
#define EFFECTACTION_H | ||
|
||
#include <SoDlib.h> | ||
|
||
const int EFFECTACTION_TYPE_SPAWN_EFFECT = 1; | ||
const int EFFECTACTION_TYPE_DESTRUCT = 2; | ||
const int EFFECTACTION_TYPE_INFLICT_CONDITION = 3; | ||
|
||
const int EFFECTACTION_CONDITION_NONE = 0; | ||
const int EFFECTACTION_CONDITION_CROSS_GROUND = 1; | ||
const int EFFECTACTION_CONDITION_CROSS_ENEMY_BODY = 2; | ||
const int EFFECTACTION_CONDITION_CROSS_FRIEND_BODY = 3; | ||
|
||
const int EFFECTACTION_TARGET_FRIEND = 1; | ||
const int EFFECTACTION_TARGET_ENEMY = 2; | ||
|
||
class EffectAction | ||
{ | ||
public: | ||
EffectAction(); | ||
virtual ~EffectAction(); | ||
|
||
void loadFromXml(TiXmlElement* xml); | ||
float getStartTime(); | ||
float getInterval(); | ||
int getCondition(); | ||
int getTargets(); | ||
int getType(); int getParam(); | ||
int getMaxInteractions(); | ||
protected: | ||
int type; int param; | ||
float interval; | ||
int condition; | ||
float startTime; | ||
int targets; | ||
int maxInteractions; | ||
private: | ||
}; | ||
|
||
#endif // EFFECTACTION_H |
Oops, something went wrong.