- Barotrauma's projects are in the Barotrauma directory - All libraries are in the Libraries directory - MonoGame is now managed by NuGet, rather than referenced from the installed files (TODO: consider using PCL for easier cross-platform development?) - NuGet libraries are not included in the repo, as getting the latest versions automatically should be preferred - Removed Content/effects.mgfx as it didn't seem to be used anywhere - Removed some references to Subsurface directory - Renamed Launcher2 to Launcher
56 lines
2.4 KiB
C#
56 lines
2.4 KiB
C#
using Microsoft.Xna.Framework;
|
|
using System;
|
|
|
|
namespace Barotrauma
|
|
{
|
|
partial class HumanAIController : AIController
|
|
{
|
|
partial void InitProjSpecific()
|
|
{
|
|
if (GameMain.GameSession != null && GameMain.GameSession.CrewManager != null)
|
|
{
|
|
CurrentOrder = Order.PrefabList.Find(o => o.Name.ToLowerInvariant() == "dismissed");
|
|
objectiveManager.SetOrder(CurrentOrder, "");
|
|
GameMain.GameSession.CrewManager.SetCharacterOrder(Character, CurrentOrder);
|
|
}
|
|
}
|
|
|
|
partial void SetOrderProjSpecific(Order order)
|
|
{
|
|
GameMain.GameSession.CrewManager.SetCharacterOrder(Character, order);
|
|
}
|
|
|
|
public override void DebugDraw(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch)
|
|
{
|
|
if (selectedAiTarget != null)
|
|
{
|
|
GUI.DrawLine(spriteBatch,
|
|
new Vector2(Character.DrawPosition.X, -Character.DrawPosition.Y),
|
|
new Vector2(selectedAiTarget.WorldPosition.X, -selectedAiTarget.WorldPosition.Y), Color.Red);
|
|
}
|
|
|
|
IndoorsSteeringManager pathSteering = steeringManager as IndoorsSteeringManager;
|
|
if (pathSteering == null || pathSteering.CurrentPath == null || pathSteering.CurrentPath.CurrentNode == null) return;
|
|
|
|
GUI.DrawLine(spriteBatch,
|
|
new Vector2(Character.DrawPosition.X, -Character.DrawPosition.Y),
|
|
new Vector2(pathSteering.CurrentPath.CurrentNode.DrawPosition.X, -pathSteering.CurrentPath.CurrentNode.DrawPosition.Y),
|
|
Color.LightGreen);
|
|
|
|
|
|
for (int i = 1; i < pathSteering.CurrentPath.Nodes.Count; i++)
|
|
{
|
|
GUI.DrawLine(spriteBatch,
|
|
new Vector2(pathSteering.CurrentPath.Nodes[i].DrawPosition.X, -pathSteering.CurrentPath.Nodes[i].DrawPosition.Y),
|
|
new Vector2(pathSteering.CurrentPath.Nodes[i - 1].DrawPosition.X, -pathSteering.CurrentPath.Nodes[i - 1].DrawPosition.Y),
|
|
Color.LightGreen);
|
|
|
|
GUI.SmallFont.DrawString(spriteBatch,
|
|
pathSteering.CurrentPath.Nodes[i].ID.ToString(),
|
|
new Vector2(pathSteering.CurrentPath.Nodes[i].DrawPosition.X, -pathSteering.CurrentPath.Nodes[i].DrawPosition.Y - 10),
|
|
Color.LightGreen);
|
|
}
|
|
}
|
|
}
|
|
}
|