| | 1 | | namespace DCL.Emotes |
| | 2 | | { |
| | 3 | | public class NftEmoteReference : IEmoteReference |
| | 4 | | { |
| | 5 | | private readonly WearableItem emoteItem; |
| | 6 | | private readonly IEmoteAnimationLoader loader; |
| | 7 | | private readonly EmoteClipData emoteClipData; |
| | 8 | |
|
| 0 | 9 | | public NftEmoteReference(WearableItem emoteItem, IEmoteAnimationLoader loader, bool loop) |
| | 10 | | { |
| 0 | 11 | | this.emoteItem = emoteItem; |
| 0 | 12 | | this.loader = loader; |
| 0 | 13 | | emoteClipData = new EmoteClipData(loader.mainClip, loader.container, loader.audioSource, loop); |
| 0 | 14 | | } |
| | 15 | |
|
| | 16 | | public WearableItem GetEntity() => |
| 0 | 17 | | emoteItem; |
| | 18 | |
|
| | 19 | | public EmoteClipData GetData() => |
| 0 | 20 | | emoteClipData; |
| | 21 | |
|
| | 22 | | public void Dispose() |
| | 23 | | { |
| 0 | 24 | | loader.Dispose(); |
| 0 | 25 | | } |
| | 26 | | } |
| | 27 | | } |