SHOW:
|
|
- or go back to the newest paste.
| 1 | Class HyperspaceLocation : public Object {
| |
| 2 | private: | |
| 3 | String location; | |
| 4 | String scene; | |
| 5 | Vector3 position; | |
| 6 | public: | |
| 7 | HyperspaceLocation(String location, String scene, Vector3 position) {
| |
| 8 | this->location = location; | |
| 9 | this->scene = scene; | |
| 10 | this->position = position; | |
| 11 | } | |
| 12 | ||
| 13 | HyperspaceLocation(DataTableRow* row) {
| |
| 14 | parseDataTableRow(row); | |
| 15 | } | |
| 16 | ||
| 17 | inline String& getLocation() {
| |
| 18 | return location; | |
| 19 | } | |
| 20 | ||
| 21 | inline String& getScene() {
| |
| 22 | return scene; | |
| 23 | } | |
| 24 | ||
| 25 | inline int getX() {
| |
| 26 | return position.getX(); | |
| 27 | } | |
| 28 | ||
| 29 | inline int getY() {
| |
| 30 | return position.getY(); | |
| 31 | } | |
| 32 | ||
| 33 | inline int getZ() {
| |
| 34 | return position.getZ(); | |
| 35 | } | |
| 36 | ||
| 37 | void parseDataTableRow(DataTableRow* row) {
| |
| 38 | float x, y, z; | |
| 39 | row->getValue(0, location); | |
| 40 | row->getValue(1, scene); | |
| 41 | row->getValue(2, x); | |
| 42 | row->getValue(3, y); | |
| 43 | row->getValue(4, Z); | |
| 44 | position.setX(x); | |
| 45 | position.setY(y); | |
| 46 | position.setZ(z); | |
| 47 | } | |
| 48 | ||
| 49 | } |