GodotComponentTest/tests/NavigationComponentTests.cs

28 lines
779 B
C#
Raw Normal View History

using Godot;
using GoDotTest;
public class NavigationComponentTests : TestClass
{
private readonly Node _testScene;
private readonly PackedScene _WorldScene = GD.Load<PackedScene>("res://scenes/World.tscn");
private KinematicBody _kinematicBody;
private NavigationComponent _navigationComponent;
private World _world;
public NavigationComponentTests(Node testScene) : base(testScene)
{
_testScene = testScene;
}
[Setup]
public void Setup()
{
_world = (World)_WorldScene.Instance();
_world.HexGrid = new HexGrid();
_testScene.AddChild(_world);
_kinematicBody = new KinematicBody();
_navigationComponent = new NavigationComponent();
_navigationComponent.World = _world;
}
}