Removed from namespace godot.
This commit is contained in:
@@ -8,8 +8,6 @@
|
|||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace godot {
|
|
||||||
|
|
||||||
enum TerrainType : int
|
enum TerrainType : int
|
||||||
{
|
{
|
||||||
STAIRS = -1,
|
STAIRS = -1,
|
||||||
@@ -42,7 +40,7 @@ private:
|
|||||||
static bool compare_nodes(const Node *left, const Node *right);
|
static bool compare_nodes(const Node *left, const Node *right);
|
||||||
|
|
||||||
Node(int x, int y);
|
Node(int x, int y);
|
||||||
void open(int pass, Node *parent, int distanceFromStart, const Vector2i &end);
|
void open(int pass, Node *parent, int distanceFromStart, const godot::Vector2i &end);
|
||||||
void close(int pass);
|
void close(int pass);
|
||||||
NodeState state(int pass) const;
|
NodeState state(int pass) const;
|
||||||
int total_cost() const;
|
int total_cost() const;
|
||||||
@@ -51,21 +49,21 @@ public:
|
|||||||
Node();
|
Node();
|
||||||
};
|
};
|
||||||
|
|
||||||
class MultilevelAStarEx : public RefCounted
|
class MultilevelAStarEx : public godot::RefCounted
|
||||||
{
|
{
|
||||||
GDCLASS(MultilevelAStarEx, RefCounted)
|
GDCLASS(MultilevelAStarEx, godot::RefCounted)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool _init;
|
bool _init;
|
||||||
int _pass;
|
int _pass;
|
||||||
std::vector<Node> _nodes;
|
std::vector<Node> _nodes;
|
||||||
|
|
||||||
Rect2i _region;
|
godot::Rect2i _region;
|
||||||
Vector2i _trans;
|
godot::Vector2i _trans;
|
||||||
int _width, _height;
|
int _width, _height;
|
||||||
|
|
||||||
bool can_move(const Node *current, int x, int y) const;
|
bool can_move(const Node *current, int x, int y) const;
|
||||||
TypedArray<Vector2i> generate_path(const Node *current) const;
|
godot::TypedArray<godot::Vector2i> generate_path(const Node *current) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
@@ -74,17 +72,15 @@ public:
|
|||||||
MultilevelAStarEx();
|
MultilevelAStarEx();
|
||||||
~MultilevelAStarEx();
|
~MultilevelAStarEx();
|
||||||
|
|
||||||
void init(const Rect2i ®ion);
|
void init(const godot::Rect2i ®ion);
|
||||||
Rect2i get_region() const;
|
godot::Rect2i get_region() const;
|
||||||
void set_terrain(const Vector2i &cell, TerrainType type);
|
void set_terrain(const godot::Vector2i &cell, TerrainType type);
|
||||||
TerrainType get_terrain(const Vector2i &cell) const;
|
TerrainType get_terrain(const godot::Vector2i &cell) const;
|
||||||
void set_unit(const Vector2i &cell, bool blocked);
|
void set_unit(const godot::Vector2i &cell, bool blocked);
|
||||||
bool get_unit(const Vector2i &cell) const;
|
bool get_unit(const godot::Vector2i &cell) const;
|
||||||
TypedArray<Vector2i> find_path(const Vector2i &from, const Vector2i &to, bool return_closest);
|
godot::TypedArray<godot::Vector2i> find_path(const godot::Vector2i &from, const godot::Vector2i &to, bool return_closest);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
VARIANT_ENUM_CAST(TerrainType);
|
VARIANT_ENUM_CAST(TerrainType);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
Reference in New Issue
Block a user