4d225c65f2
- 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
69 lines
1.6 KiB
C#
69 lines
1.6 KiB
C#
using Lidgren.Network;
|
|
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
|
|
namespace Barotrauma
|
|
{
|
|
partial class AIController : ISteerable
|
|
{
|
|
public enum AiState { None, Attack, GoTo, Escape }
|
|
public enum SteeringState { Wander, Seek, Escape }
|
|
|
|
public bool Enabled;
|
|
|
|
public readonly Character Character;
|
|
|
|
protected AiState state;
|
|
|
|
protected SteeringManager steeringManager;
|
|
|
|
public SteeringManager SteeringManager
|
|
{
|
|
get { return steeringManager; }
|
|
}
|
|
|
|
public Vector2 Steering
|
|
{
|
|
get { return Character.AnimController.TargetMovement; }
|
|
set { Character.AnimController.TargetMovement = value; }
|
|
}
|
|
|
|
public Vector2 SimPosition
|
|
{
|
|
get { return Character.SimPosition; }
|
|
}
|
|
|
|
public Vector2 WorldPosition
|
|
{
|
|
get { return Character.WorldPosition; }
|
|
}
|
|
|
|
public Vector2 Velocity
|
|
{
|
|
get { return Character.AnimController.Collider.LinearVelocity; }
|
|
}
|
|
|
|
public AiState State
|
|
{
|
|
get { return state; }
|
|
set { state = value; }
|
|
}
|
|
|
|
public AIController (Character c)
|
|
{
|
|
Character = c;
|
|
|
|
Enabled = true;
|
|
}
|
|
|
|
public virtual void OnAttacked(IDamageable attacker, float amount) { }
|
|
|
|
public virtual void SelectTarget(AITarget target) { }
|
|
|
|
public virtual void Update(float deltaTime) { }
|
|
|
|
//protected Structure lastStructurePicked;
|
|
|
|
}
|
|
}
|