31 lines
870 B
C#
31 lines
870 B
C#
using Godot;
|
|
using GoDotTest;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using Xunit;
|
|
|
|
public class NavigationComponentTests : TestClass
|
|
{
|
|
private Node _testScene = null;
|
|
private TileWorld _tileWorld;
|
|
private NavigationComponent _navigationComponent;
|
|
private KinematicBody _kinematicBody;
|
|
|
|
private PackedScene _tileWorldScene = GD.Load<PackedScene>("res://scenes/TileWorld.tscn");
|
|
|
|
public NavigationComponentTests(Node testScene) : base(testScene)
|
|
{
|
|
_testScene = testScene;
|
|
}
|
|
|
|
[Setup]
|
|
public void Setup()
|
|
{
|
|
_tileWorld = (TileWorld)_tileWorldScene.Instance();
|
|
_tileWorld.HexGrid = new HexGrid();
|
|
_testScene.AddChild(_tileWorld);
|
|
_kinematicBody = new KinematicBody();
|
|
_navigationComponent = new NavigationComponent();
|
|
_navigationComponent.TileWorld = _tileWorld;
|
|
}
|
|
} |