Some minor changes/additions.

This commit is contained in:
BenDol
2014-08-07 06:40:56 +12:00
parent 3343919c92
commit ef7f94ac76
5 changed files with 35 additions and 8 deletions

View File

@@ -117,6 +117,12 @@ struct Animation {
int loopCount;
bool async;
std::vector<std::tuple<int, int> > frames;
float duration(uint8 frame) {
assert(frames.size() <= frame);
std::tuple<int, int> data = frames.at(frame);
return stdext::random_range((long)std::get<0>(data), (long)std::get<1>(data));
}
};
class ThingType : public LuaObject