New animation step constructor
This commit is contained in:
@@ -47,7 +47,7 @@ private:
|
||||
int64_t id_;
|
||||
std::string action_;
|
||||
int bits_;
|
||||
|
||||
|
||||
float facing_;
|
||||
util::XYZ xyz_;
|
||||
std::string graphic_;
|
||||
@@ -84,13 +84,30 @@ public:
|
||||
const AnimStep &nth(int n) const { return steps_[n]; }
|
||||
int size() const { return steps_.size(); }
|
||||
|
||||
// Mutators to create new steps.
|
||||
// Mutators to create new steps from C++
|
||||
//
|
||||
void add(int64_t id, const std::string &action);
|
||||
void set_facing(float f);
|
||||
void set_xyz(util::XYZ xyz);
|
||||
void set_graphic(const std::string &g);
|
||||
void set_plane(const std::string &p);
|
||||
|
||||
// Mutator to create new steps from lua.
|
||||
//
|
||||
// Lua stack must contain a table, which may contain:
|
||||
// action: "action"
|
||||
// facing: 0.0 - 360.0
|
||||
// x: x-coordinate
|
||||
// y: y-coordinate
|
||||
// z: z-coordinate
|
||||
// dx: delta-x
|
||||
// dy: delta-y
|
||||
// dz: delta-z
|
||||
// graphic: "graphic"
|
||||
// plane: "plane"
|
||||
//
|
||||
void add(int64_t id, lua_State *L, int idx);
|
||||
|
||||
// Get the final resting place after all animations are complete.
|
||||
const std::string &get_graphic() const;
|
||||
const std::string &get_plane() const;
|
||||
|
||||
Reference in New Issue
Block a user