mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-23 20:43:04 +00:00
71 lines
1.6 KiB
C#
71 lines
1.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using SanAndreasUnity.Behaviours.Vehicles;
|
|
using SanAndreasUnity.Utilities;
|
|
|
|
namespace SanAndreasUnity.Behaviours.Peds.AI
|
|
{
|
|
/// <summary>
|
|
/// Base class for all ped AI states.
|
|
/// </summary>
|
|
public abstract class BaseState : IState
|
|
{
|
|
protected PedAI _pedAI { get; private set; }
|
|
|
|
protected Ped _ped => _pedAI.MyPed;
|
|
protected Ped MyPed => _pedAI.MyPed;
|
|
protected List<Ped> _enemyPeds => _pedAI.EnemyPeds;
|
|
|
|
|
|
protected internal virtual void OnAwake(PedAI pedAI)
|
|
{
|
|
_pedAI = pedAI;
|
|
}
|
|
|
|
public virtual void OnBecameActive()
|
|
{
|
|
}
|
|
|
|
public virtual void OnBecameInactive()
|
|
{
|
|
}
|
|
|
|
public bool RepresentsState(Type type)
|
|
{
|
|
throw new NotSupportedException();
|
|
}
|
|
|
|
public bool RepresentsState<T>() where T : IState
|
|
{
|
|
throw new NotSupportedException();
|
|
}
|
|
|
|
public virtual void UpdateState()
|
|
{
|
|
}
|
|
|
|
public virtual void LateUpdateState()
|
|
{
|
|
}
|
|
|
|
public virtual void FixedUpdateState()
|
|
{
|
|
}
|
|
|
|
protected internal virtual void OnMyPedDamaged(DamageInfo dmgInfo, Ped.DamageResult dmgResult)
|
|
{
|
|
}
|
|
|
|
protected internal virtual void OnOtherPedDamaged(Ped damagedPed, DamageInfo dmgInfo, Ped.DamageResult dmgResult)
|
|
{
|
|
}
|
|
|
|
protected internal virtual void OnVehicleDamaged(Vehicle vehicle, DamageInfo damageInfo)
|
|
{
|
|
}
|
|
|
|
protected internal virtual void OnDrawGizmosSelected()
|
|
{
|
|
}
|
|
}
|
|
}
|