-
Notifications
You must be signed in to change notification settings - Fork 16
/
NumPadController.cs
38 lines (33 loc) · 1.28 KB
/
NumPadController.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using AutomaticTypeMapper;
using EndlessClient.Rendering.Character;
using EOLib.Domain.Character;
using EOLib.Domain.Extensions;
namespace EndlessClient.Controllers
{
[AutoMappedType]
public class NumPadController : INumPadController
{
private readonly ICharacterActions _characterActions;
private readonly ICharacterAnimationActions _characterAnimationActions;
private readonly ICharacterProvider _characterProvider;
public NumPadController(ICharacterActions characterActions,
ICharacterAnimationActions characterAnimationActions,
ICharacterProvider characterProvider)
{
_characterActions = characterActions;
_characterAnimationActions = characterAnimationActions;
_characterProvider = characterProvider;
}
public void Emote(Emote whichEmote)
{
if (!_characterProvider.MainCharacter.RenderProperties.IsActing(CharacterActionState.Standing, CharacterActionState.Sitting))
return;
_characterActions.Emote(whichEmote);
_characterAnimationActions.Emote(whichEmote);
}
}
public interface INumPadController
{
void Emote(Emote whichEmote);
}
}