quantum-space-buddies/QSB/Animation/NPC/WorldObjects/QSBCharacterAnimController.cs

41 lines
917 B
C#
Raw Normal View History

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