2021-04-27 22:49:12 +01:00
|
|
|
|
using OWML.Utils;
|
2021-04-26 14:30:21 +01:00
|
|
|
|
using QSB.Player;
|
|
|
|
|
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
|
|
|
|
{
|
|
|
|
|
private readonly List<PlayerInfo> _playersInHeadZone = new List<PlayerInfo>();
|
|
|
|
|
|
|
|
|
|
public List<PlayerInfo> GetPlayersInHeadZone()
|
|
|
|
|
=> _playersInHeadZone;
|
|
|
|
|
|
|
|
|
|
public void AddPlayerToHeadZone(PlayerInfo player)
|
|
|
|
|
{
|
|
|
|
|
if (_playersInHeadZone.Contains(player))
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
2021-06-18 22:38:32 +01:00
|
|
|
|
|
2021-04-26 14:30:21 +01:00
|
|
|
|
_playersInHeadZone.Add(player);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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-04-29 18:30:45 +01:00
|
|
|
|
public override CharacterDialogueTree GetDialogueTree()
|
|
|
|
|
=> AttachedObject.GetValue<CharacterDialogueTree>("_dialogueTree");
|
2021-04-29 20:59:25 +01:00
|
|
|
|
|
|
|
|
|
public override bool InConversation()
|
|
|
|
|
=> AttachedObject.GetValue<bool>("_inConversation");
|
2021-04-26 14:30:21 +01:00
|
|
|
|
}
|
|
|
|
|
}
|