GodotComponentTest/tests/NavigationComponentTests.cs

25 lines
771 B
C#

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;
}
}