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