-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
bin | ||
/Library | ||
*.db | ||
*.suo | ||
/Assets/Plugins | ||
/Assets/UnityVS | ||
/Assets/AstarPathfindingProject | ||
*.csproj | ||
*.sln | ||
*.user | ||
/Assets/UnityVS.meta |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
| ||
|
||
using Pathfinding; | ||
using uFrame.Actions; | ||
using uFrame.Attributes; | ||
using UnityEngine; | ||
|
||
namespace EECSModules.AStarPathfinding | ||
{ | ||
[uFrameCategory("A* Pathfinding", "Paths")] | ||
[ActionTitle("Draw Debug Path")] | ||
[ActionDescription("Draws a debug line for the path in the scene")] | ||
public class DrawDebugPathAction : UFAction | ||
{ | ||
[In] | ||
public Path Path; | ||
|
||
public Color PathColor = Color.green; | ||
public float TimeToShow = 0.1f; | ||
|
||
public override void Execute() | ||
{ | ||
var vectorPath = Path.vectorPath; | ||
for (var i = 1; i < vectorPath.Count; i++) | ||
{ | ||
Debug.DrawLine(vectorPath[i - 1], vectorPath[i], PathColor, TimeToShow); | ||
} | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using Pathfinding; | ||
using uFrame.Actions; | ||
using uFrame.Attributes; | ||
|
||
namespace ECSModules.AStarPathfinding | ||
{ | ||
[uFrameCategory("A* Pathfinding", "Graphs")] | ||
[ActionTitle("Flood Fill Graphs")] | ||
[ActionDescription("Flood fills graphs forcing updates to propogate")] | ||
public class FloodFillGraphsAction : UFAction | ||
{ | ||
[In] | ||
public GraphNode StartingNode; | ||
|
||
[In] | ||
public int Area; | ||
|
||
public override void Execute() | ||
{ | ||
if (StartingNode == null) | ||
{ AstarPath.active.FloodFill(); } | ||
else if (Area <= 0) | ||
{ AstarPath.active.FloodFill(StartingNode); } | ||
else | ||
{ AstarPath.active.FloodFill(StartingNode, (uint)Area); } | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
|
||
|
||
using uFrame.Actions; | ||
using uFrame.Attributes; | ||
|
||
namespace ECSModules.AStarPathfinding | ||
{ | ||
[uFrameCategory("A* Pathfinding", "Graphs")] | ||
[ActionTitle("Flush Graph Updates")] | ||
[ActionDescription("Flushes all graph updates")] | ||
public class FlushGraphUpdatesAction : UFAction | ||
{ | ||
public override void Execute() | ||
{ | ||
AstarPath.active.FlushGraphUpdates(); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
|
||
using Pathfinding; | ||
using uFrame.Actions; | ||
using uFrame.Attributes; | ||
|
||
namespace NodeCanvasAddons | ||
{ | ||
[uFrameCategory("A* Pathfinding", "Graphs")] | ||
[ActionTitle("Get Graph By Index")] | ||
[ActionDescription("Gets a graph in the scene by index")] | ||
public class GetGraphByIndexAction : UFAction | ||
{ | ||
[In] | ||
public int GraphIndex; | ||
|
||
[Out] | ||
public NavGraph LocatedGraph; | ||
|
||
public override void Execute() | ||
{ | ||
if (AstarPath.active.graphs.Length <= GraphIndex) | ||
{ return; } | ||
|
||
LocatedGraph = AstarPath.active.graphs[GraphIndex]; | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
|
||
using Pathfinding; | ||
using uFrame.Actions; | ||
using uFrame.Attributes; | ||
|
||
namespace ECSModules.AStarPathfinding | ||
{ | ||
[uFrameCategory("A* Pathfinding", "Graphs")] | ||
[ActionTitle("Get Graph From Node")] | ||
[ActionDescription("Gets a graph from a node")] | ||
public class GetGraphFromNodeAction : UFAction | ||
{ | ||
[In] | ||
public GraphNode Node; | ||
|
||
[Out] | ||
public NavGraph LocatedGraph; | ||
|
||
public override void Execute() | ||
{ | ||
LocatedGraph = AstarPath.active.graphs[Node.GraphIndex]; | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
| ||
|
||
using Pathfinding; | ||
using uFrame.Actions; | ||
using uFrame.Attributes; | ||
|
||
namespace ECSModules.AStarPathfinding | ||
{ | ||
[uFrameCategory("A* Pathfinding", "Graphs")] | ||
[ActionTitle("Rescan Graph")] | ||
[ActionDescription("Rescans the graph to see if any changes have occurred")] | ||
public class RescanGraphAction : UFAction | ||
{ | ||
[In] | ||
public NavGraph Graph; | ||
|
||
public override void Execute() | ||
{ | ||
Graph.ScanInternal(); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
|
||
|
||
using uFrame.Actions; | ||
using uFrame.Attributes; | ||
|
||
namespace ECSModules.AStarPathfinding | ||
{ | ||
[uFrameCategory("A* Pathfinding", "Graphs")] | ||
[ActionTitle("Rescan Graphs")] | ||
[ActionDescription("Rescans all graphs in the scene")] | ||
public class RescanGraphsAction : UFAction | ||
{ | ||
public override void Execute() | ||
{ | ||
AstarPath.active.Scan(); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
|
||
|
||
using uFrame.Actions; | ||
using uFrame.Attributes; | ||
|
||
namespace ECSModules.AStarPathfinding | ||
{ | ||
[uFrameCategory("A* Pathfinding")] | ||
[ActionTitle("Set Heuristic")] | ||
[ActionDescription("Sets the heuristic to use when calculating paths")] | ||
public class SetHeuristicAction : UFAction | ||
{ | ||
[In] | ||
public Heuristic Heuristic = Heuristic.Euclidean; | ||
|
||
public override void Execute() | ||
{ | ||
AstarPath.active.heuristic = Heuristic; | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
|
||
|
||
using uFrame.Actions; | ||
using uFrame.Attributes; | ||
|
||
namespace ECSModules.AStarPathfinding | ||
{ | ||
[uFrameCategory("A* Pathfinding")] | ||
[ActionTitle("Set Heuristic Scale")] | ||
[ActionDescription("Sets the heuristic scale to use when calculating paths")] | ||
public class SetHeuristicScaleAction : UFAction | ||
{ | ||
[In] | ||
public float HeuristicScale; | ||
|
||
public override void Execute() | ||
{ | ||
AstarPath.active.heuristicScale = HeuristicScale; | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.