GodotComponentTest/tests/NavigationComponentTests.cs

25 lines
771 B
C#
Raw Normal View History

using Godot;
using GoDotTest;
2023-11-18 22:32:57 +01:00
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;
2023-11-18 22:32:57 +01:00
public NavigationComponentTests(Node testScene) : base(testScene) {
_testScene = testScene;
}
[Setup]
2023-11-18 22:32:57 +01:00
public void Setup() {
_world = (World)_WorldScene.Instance();
_world.HexGrid = new HexGrid();
_testScene.AddChild(_world);
_kinematicBody = new KinematicBody();
_navigationComponent = new NavigationComponent();
_navigationComponent.World = _world;
}
}