2021-11-23 03:01:53 -08:00
|
|
|
|
using QSB.Player;
|
2021-04-26 14:30:21 +01:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
2021-04-29 18:30:45 +01:00
|
|
|
|
namespace QSB.Animation.NPC.WorldObjects
|
2021-04-26 14:30:21 +01:00
|
|
|
|
{
|
2021-04-29 18:30:45 +01:00
|
|
|
|
internal class QSBCharacterAnimController : NpcAnimController<CharacterAnimController>
|
2021-04-26 14:30:21 +01:00
|
|
|
|
{
|
2021-11-20 19:49:50 +00:00
|
|
|
|
private readonly List<PlayerInfo> _playersInHeadZone = new();
|
2021-04-26 14:30:21 +01:00
|
|
|
|
|
2021-06-19 11:26:05 +01:00
|
|
|
|
public List<PlayerInfo> GetPlayersInHeadZone()
|
2021-04-26 14:30:21 +01:00
|
|
|
|
=> _playersInHeadZone;
|
|
|
|
|
|
|
|
|
|
public void AddPlayerToHeadZone(PlayerInfo player)
|
|
|
|
|
{
|
|
|
|
|
if (_playersInHeadZone.Contains(player))
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
2021-06-18 22:38:32 +01:00
|
|
|
|
|
2021-06-19 11:26:05 +01:00
|
|
|
|
_playersInHeadZone.Add(player);
|
2021-04-26 14:30:21 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void RemovePlayerFromHeadZone(PlayerInfo player)
|
|
|
|
|
{
|
|
|
|
|
if (!_playersInHeadZone.Contains(player))
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
2021-06-18 22:38:32 +01:00
|
|
|
|
|
2021-04-26 14:30:21 +01:00
|
|
|
|
_playersInHeadZone.Remove(player);
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-19 11:26:05 +01:00
|
|
|
|
public override CharacterDialogueTree GetDialogueTree()
|
2021-11-23 08:41:05 +00:00
|
|
|
|
=> AttachedObject._dialogueTree;
|
2021-04-29 20:59:25 +01:00
|
|
|
|
|
2021-06-19 11:26:05 +01:00
|
|
|
|
public override bool InConversation()
|
2021-11-23 08:41:05 +00:00
|
|
|
|
=> AttachedObject._inConversation;
|
2021-04-26 14:30:21 +01:00
|
|
|
|
}
|
|
|
|
|
}
|