SHOW:
|
|
- or go back to the newest paste.
1 | - | #include "stdafx.h" |
1 | + | #ifndef HEXTILE_HPP |
2 | - | #include <iostream> |
2 | + | #define HEXTILE_HPP |
3 | ||
4 | - | using namespace std; |
4 | + | #include <Godot.hpp> |
5 | #include <Spatial.hpp> | |
6 | #include <ArrayMesh.hpp> | |
7 | - | int main() |
7 | + | #include <MeshInstance.hpp> |
8 | ||
9 | - | int num = 0; |
9 | + | namespace godot |
10 | - | int result = 0; |
10 | + | |
11 | - | cin >> num; |
11 | + | |
12 | - | for (int i = 2;i<num+1; i+=2) { |
12 | + | class HexTile : public Spatial |
13 | - | result += i; |
13 | + | { GODOT_CLASS(HexTile, Spatial) |
14 | - | |
14 | + | |
15 | - | } |
15 | + | private: |
16 | - | cout << endl << result << endl; |
16 | + | MeshInstance* _mesh; |
17 | - | system("pause"); |
17 | + | |
18 | - | return 0; |
18 | + | int _x; |
19 | - | } |
19 | + | int _y; |
20 | int _q; | |
21 | int _r; | |
22 | int _s; | |
23 | ||
24 | double _elevation; | |
25 | double _moisture; | |
26 | ||
27 | Vector3 _position; | |
28 | ||
29 | public: | |
30 | HexTile(int pX, int pY, double pElevation, double pMoisture, Ref<ArrayMesh> pMesh); | |
31 | HexTile(); | |
32 | static void _register_methods(); | |
33 | void _init(); | |
34 | ||
35 | }; | |
36 | ||
37 | } | |
38 | ||
39 | #endif /* HEXTILE_HPP */ |