| | 1 | | using AvatarSystem; |
| | 2 | | using Cysharp.Threading.Tasks; |
| | 3 | | using System; |
| | 4 | | using System.Collections.Generic; |
| | 5 | | using System.Linq; |
| | 6 | | using DCL.Emotes; |
| | 7 | | using DCL.Helpers; |
| | 8 | | using DCL.Tasks; |
| | 9 | | using System.Threading; |
| | 10 | | using UnityEngine; |
| | 11 | |
|
| | 12 | | namespace DCL.EmotesCustomization |
| | 13 | | { |
| | 14 | | public class EmotesCustomizationComponentController : IEmotesCustomizationComponentController |
| | 15 | | { |
| | 16 | | public event Action<string> onEmotePreviewed; |
| | 17 | | public event Action<string> onEmoteEquipped; |
| | 18 | | public event Action<string> onEmoteUnequipped; |
| | 19 | | public event Action<string> onEmoteSell; |
| | 20 | |
|
| | 21 | | internal const int NUMBER_OF_SLOTS = 10; |
| | 22 | | internal string bodyShapeId; |
| | 23 | |
|
| | 24 | | internal DataStore_EmotesCustomization emotesCustomizationDataStore; |
| 0 | 25 | | internal BaseDictionary<string, EmoteCardComponentView> emotesInLoadingState = new (); |
| | 26 | | internal InputAction_Hold equipInputAction; |
| | 27 | | internal DataStore_ExploreV2 exploreV2DataStore; |
| | 28 | | internal DataStore_HUDs hudsDataStore; |
| 0 | 29 | | internal Dictionary<string, WearableItem> ownedEmotes = new (); |
| | 30 | | // internal InputAction_Hold showInfoInputAction; |
| | 31 | | internal InputAction_Trigger shortcut0InputAction; |
| | 32 | | internal InputAction_Trigger shortcut1InputAction; |
| | 33 | | internal InputAction_Trigger shortcut2InputAction; |
| | 34 | | internal InputAction_Trigger shortcut3InputAction; |
| | 35 | | internal InputAction_Trigger shortcut4InputAction; |
| | 36 | | internal InputAction_Trigger shortcut5InputAction; |
| | 37 | | internal InputAction_Trigger shortcut6InputAction; |
| | 38 | | internal InputAction_Trigger shortcut7InputAction; |
| | 39 | | internal InputAction_Trigger shortcut8InputAction; |
| | 40 | | internal InputAction_Trigger shortcut9InputAction; |
| | 41 | |
|
| | 42 | | internal IEmotesCustomizationComponentView view; |
| | 43 | |
|
| 0 | 44 | | internal bool isEmotesCustomizationSectionOpen => exploreV2DataStore.isOpen.Get() && view.isActive; |
| | 45 | |
|
| 0 | 46 | | private CancellationTokenSource cts = new (); |
| | 47 | | private IAvatarEmotesController emotesController; |
| | 48 | |
|
| 0 | 49 | | public EmotesCustomizationComponentController() { } |
| | 50 | |
|
| 0 | 51 | | public EmotesCustomizationComponentController(DataStore_EmotesCustomization emotesCustomizationDataStore, |
| | 52 | | IAvatarEmotesController avatarEmotesController, |
| | 53 | | DataStore_ExploreV2 exploreV2DataStore, |
| | 54 | | DataStore_HUDs hudsDataStore, |
| | 55 | | Transform parent, |
| | 56 | | string viewPath = "EmotesCustomization/EmotesCustomizationSection") |
| | 57 | | { |
| 0 | 58 | | Initialize(emotesCustomizationDataStore, avatarEmotesController, exploreV2DataStore, hudsDataStore, parent, |
| 0 | 59 | | } |
| | 60 | |
|
| | 61 | | internal void Initialize(DataStore_EmotesCustomization emotesCustomizationDataStore, |
| | 62 | | IAvatarEmotesController avatarEmotesController, |
| | 63 | | DataStore_ExploreV2 exploreV2DataStore, |
| | 64 | | DataStore_HUDs hudsDataStore, |
| | 65 | | Transform parent, |
| | 66 | | string viewPath = "EmotesCustomization/EmotesCustomizationSection") |
| | 67 | | { |
| 0 | 68 | | this.emotesController = avatarEmotesController; |
| 0 | 69 | | this.emotesCustomizationDataStore = emotesCustomizationDataStore; |
| 0 | 70 | | this.exploreV2DataStore = exploreV2DataStore; |
| 0 | 71 | | this.hudsDataStore = hudsDataStore; |
| | 72 | |
|
| 0 | 73 | | ConfigureView(parent, viewPath); |
| 0 | 74 | | ConfigureShortcuts(); |
| | 75 | |
|
| 0 | 76 | | emotesCustomizationDataStore.equippedEmotes.OnSet += OnEquippedEmotesSet; |
| 0 | 77 | | OnEquippedEmotesSet(emotesCustomizationDataStore.equippedEmotes.Get()); |
| | 78 | |
|
| 0 | 79 | | this.emotesController.OnEmoteEquipped += OnAnimationAdded; |
| 0 | 80 | | } |
| | 81 | |
|
| | 82 | | public void SetEmotes(WearableItem[] ownedEmotes) |
| | 83 | | { |
| | 84 | | //Find loaded emotes that are not contained in emotesToSet |
| 0 | 85 | | List<string> idsToRemove = emotesCustomizationDataStore.currentLoadedEmotes.Get().Where(x => ownedEmotes.All |
| | 86 | |
|
| 0 | 87 | | foreach (string emoteId in idsToRemove) |
| 0 | 88 | | RemoveEmote(emoteId); |
| | 89 | |
|
| 0 | 90 | | this.ownedEmotes.Clear(); |
| 0 | 91 | | for (int i = 0; i < ownedEmotes.Length; i++) |
| | 92 | | { |
| 0 | 93 | | WearableItem emote = ownedEmotes[i]; |
| | 94 | | //emotes owned multiple times will be received as separated entities, overriding by emote.id removes tha |
| | 95 | | //if we want to show the amount of ocurrences we can modify this |
| 0 | 96 | | this.ownedEmotes[emote.id] = emote; |
| | 97 | | } |
| 0 | 98 | | foreach (WearableItem emote in this.ownedEmotes.Values) |
| 0 | 99 | | AddEmote(emote); |
| | 100 | |
|
| 0 | 101 | | UpdateEmoteSlots(); |
| | 102 | |
|
| 0 | 103 | | view.RefreshEmotesGrid(); |
| 0 | 104 | | } |
| | 105 | |
|
| | 106 | | public void SetEquippedBodyShape(string bodyShapeId) |
| | 107 | | { |
| 0 | 108 | | if (bodyShapeId == this.bodyShapeId) |
| 0 | 109 | | return; |
| | 110 | |
|
| 0 | 111 | | this.bodyShapeId = bodyShapeId; |
| 0 | 112 | | foreach (string emoteId in this.ownedEmotes.Keys) |
| | 113 | | { |
| 0 | 114 | | RefreshEmoteLoadingState(emoteId); |
| | 115 | | } |
| 0 | 116 | | } |
| | 117 | |
|
| | 118 | | public void RestoreEmoteSlots() |
| | 119 | | { |
| 0 | 120 | | emotesCustomizationDataStore.unsavedEquippedEmotes.Set(emotesCustomizationDataStore.equippedEmotes.Get()); |
| 0 | 121 | | UpdateEmoteSlots(); |
| 0 | 122 | | } |
| | 123 | |
|
| | 124 | | public void Dispose() |
| | 125 | | { |
| 0 | 126 | | cts.SafeCancelAndDispose(); |
| 0 | 127 | | view.onEmoteEquipped -= OnEmoteEquipped; |
| 0 | 128 | | view.onEmoteUnequipped -= OnEmoteUnequipped; |
| 0 | 129 | | view.onSellEmoteClicked -= OnSellEmoteClicked; |
| 0 | 130 | | view.onSlotSelected -= OnSlotSelected; |
| 0 | 131 | | exploreV2DataStore.isOpen.OnChange -= IsStarMenuOpenChanged; |
| 0 | 132 | | hudsDataStore.avatarEditorVisible.OnChange -= OnAvatarEditorVisibleChanged; |
| 0 | 133 | | emotesCustomizationDataStore.equippedEmotes.OnSet -= OnEquippedEmotesSet; |
| 0 | 134 | | equipInputAction.OnFinished -= OnEquipInputActionTriggered; |
| | 135 | | // showInfoInputAction.OnFinished -= OnShowInfoInputActionTriggered; |
| 0 | 136 | | shortcut0InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered; |
| 0 | 137 | | shortcut1InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered; |
| 0 | 138 | | shortcut2InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered; |
| 0 | 139 | | shortcut3InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered; |
| 0 | 140 | | shortcut4InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered; |
| 0 | 141 | | shortcut5InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered; |
| 0 | 142 | | shortcut6InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered; |
| 0 | 143 | | shortcut7InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered; |
| 0 | 144 | | shortcut8InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered; |
| 0 | 145 | | shortcut9InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered; |
| 0 | 146 | | } |
| | 147 | |
|
| | 148 | | internal void OnEquippedEmotesSet(IEnumerable<EquippedEmoteData> equippedEmotes) |
| | 149 | | { |
| 0 | 150 | | emotesCustomizationDataStore.unsavedEquippedEmotes.Set(equippedEmotes); |
| 0 | 151 | | UpdateEmoteSlots(); |
| 0 | 152 | | } |
| | 153 | |
|
| | 154 | | private void ConfigureView(Transform parent, string viewPath) |
| | 155 | | { |
| 0 | 156 | | view = CreateView(viewPath); |
| | 157 | |
|
| 0 | 158 | | if (view.viewTransform != null) |
| | 159 | | { |
| 0 | 160 | | view.viewTransform.SetParent(parent, false); |
| 0 | 161 | | view.viewTransform.ResetLocalTRS(); |
| | 162 | | } |
| 0 | 163 | | view.onEmoteEquipped += OnEmoteEquipped; |
| 0 | 164 | | view.onEmoteUnequipped += OnEmoteUnequipped; |
| 0 | 165 | | view.onSellEmoteClicked += OnSellEmoteClicked; |
| 0 | 166 | | view.onSlotSelected += OnSlotSelected; |
| 0 | 167 | | exploreV2DataStore.isOpen.OnChange += IsStarMenuOpenChanged; |
| 0 | 168 | | hudsDataStore.avatarEditorVisible.OnChange += OnAvatarEditorVisibleChanged; |
| 0 | 169 | | } |
| | 170 | |
|
| 0 | 171 | | internal void IsStarMenuOpenChanged(bool currentIsOpen, bool previousIsOpen) { view.SetEmoteInfoPanelActive(fals |
| | 172 | |
|
| 0 | 173 | | internal void OnAvatarEditorVisibleChanged(bool current, bool previous) { view.SetActive(current); } |
| | 174 | |
|
| | 175 | | internal void AddEmote(WearableItem emote) |
| | 176 | | { |
| 0 | 177 | | var emoteId = emote.id; |
| 0 | 178 | | if (!emote.IsEmote() || emotesCustomizationDataStore.currentLoadedEmotes.Contains(emoteId)) |
| 0 | 179 | | return; |
| | 180 | |
|
| 0 | 181 | | emotesCustomizationDataStore.currentLoadedEmotes.Add(emoteId); |
| | 182 | |
|
| 0 | 183 | | if (!emote.ShowInBackpack()) |
| 0 | 184 | | return; |
| | 185 | |
|
| 0 | 186 | | EmoteCardComponentModel emoteToAdd = ParseWearableItemIntoEmoteCardModel(emote); |
| 0 | 187 | | EmoteCardComponentView newEmote = view.AddEmote(emoteToAdd); |
| | 188 | |
|
| 0 | 189 | | if (newEmote != null) |
| 0 | 190 | | newEmote.SetAsLoading(true); |
| | 191 | |
|
| 0 | 192 | | if (!emotesInLoadingState.ContainsKey(emoteId)) |
| 0 | 193 | | emotesInLoadingState.Add(emoteId, newEmote); |
| | 194 | |
|
| 0 | 195 | | RefreshEmoteLoadingState(emoteId); |
| 0 | 196 | | } |
| | 197 | |
|
| | 198 | | internal void RemoveEmote(string emoteId) |
| | 199 | | { |
| 0 | 200 | | emotesCustomizationDataStore.currentLoadedEmotes.Remove(emoteId); |
| 0 | 201 | | view.RemoveEmote(emoteId); |
| 0 | 202 | | UpdateEmoteSlots(); |
| 0 | 203 | | } |
| | 204 | |
|
| | 205 | | private void OnAnimationAdded(string emoteId, IEmoteReference emoteClipData) |
| | 206 | | { |
| 0 | 207 | | RefreshEmoteLoadingState(emoteId); |
| 0 | 208 | | } |
| | 209 | |
|
| | 210 | | internal void RefreshEmoteLoadingState(string emoteId) |
| | 211 | | { |
| 0 | 212 | | if (emotesController.TryGetEquippedEmote(bodyShapeId, emoteId, out IEmoteReference emoteReference)) |
| | 213 | | { |
| 0 | 214 | | emotesInLoadingState.TryGetValue(emoteId, out EmoteCardComponentView emoteCard); |
| 0 | 215 | | if (emoteCard != null) |
| | 216 | | { |
| 0 | 217 | | emoteCard.SetAsLoading(false); |
| 0 | 218 | | emoteCard.SetSoundIcon(emoteReference.GetData().AudioSource != null); |
| 0 | 219 | | emotesInLoadingState.Remove(emoteId); |
| | 220 | | } |
| | 221 | | } |
| 0 | 222 | | } |
| | 223 | |
|
| | 224 | | internal EmoteCardComponentModel ParseWearableItemIntoEmoteCardModel(WearableItem wearable) |
| | 225 | | { |
| 0 | 226 | | return new EmoteCardComponentModel |
| | 227 | | { |
| | 228 | | id = wearable.id, |
| | 229 | | name = wearable.GetName(), |
| | 230 | | amount = wearable.amount > 1 ? $"x{wearable.amount.ToString()}" : "", |
| | 231 | | description = wearable.description, |
| | 232 | | pictureUri = wearable.ComposeThumbnailUrl(), |
| | 233 | | pictureSprite = wearable.thumbnailSprite, |
| | 234 | | isAssignedInSelectedSlot = false, |
| | 235 | | isSelected = false, |
| | 236 | | assignedSlot = -1, |
| | 237 | | rarity = wearable.rarity, |
| | 238 | | isInL2 = wearable.IsInL2(), |
| | 239 | | isLoading = false, |
| | 240 | | isCollectible = wearable.IsCollectible() |
| | 241 | | }; |
| | 242 | | } |
| | 243 | |
|
| | 244 | | internal void UpdateEmoteSlots() |
| | 245 | | { |
| 0 | 246 | | for (int i = 0; i < emotesCustomizationDataStore.unsavedEquippedEmotes.Count(); i++) |
| | 247 | | { |
| 0 | 248 | | if (i > NUMBER_OF_SLOTS) |
| | 249 | | break; |
| | 250 | |
|
| 0 | 251 | | if (emotesCustomizationDataStore.unsavedEquippedEmotes[i] == null) //empty slot |
| | 252 | | { |
| 0 | 253 | | EmoteSlotCardComponentView existingEmoteIntoSlot = view.GetSlot(i); |
| 0 | 254 | | if (existingEmoteIntoSlot != null) |
| 0 | 255 | | view.UnequipEmote(existingEmoteIntoSlot.model.emoteId, i, false); |
| | 256 | |
|
| 0 | 257 | | continue; |
| | 258 | | } |
| | 259 | |
|
| 0 | 260 | | ownedEmotes.TryGetValue(emotesCustomizationDataStore.unsavedEquippedEmotes[i].id, out WearableItem emote |
| 0 | 261 | | if (emoteItem != null && emotesCustomizationDataStore.currentLoadedEmotes.Contains(emoteItem.id)) |
| 0 | 262 | | view.EquipEmote(emoteItem.id, emoteItem.GetName(), i, false, false); |
| | 263 | | } |
| 0 | 264 | | } |
| | 265 | |
|
| | 266 | | internal void StoreEquippedEmotes() |
| | 267 | | { |
| 0 | 268 | | List<EquippedEmoteData> newEquippedEmotesList = new List<EquippedEmoteData> { null, null, null, null, null, |
| | 269 | |
|
| 0 | 270 | | if (view.currentSlots != null) |
| | 271 | | { |
| 0 | 272 | | foreach (EmoteSlotCardComponentView slot in view.currentSlots) |
| | 273 | | { |
| 0 | 274 | | if (!string.IsNullOrEmpty(slot.model.emoteId)) |
| 0 | 275 | | newEquippedEmotesList[slot.model.slotNumber] = new EquippedEmoteData |
| | 276 | | { |
| | 277 | | id = slot.model.emoteId, |
| | 278 | | cachedThumbnail = slot.model.pictureSprite |
| | 279 | | }; |
| | 280 | | } |
| | 281 | | } |
| | 282 | |
|
| 0 | 283 | | emotesCustomizationDataStore.unsavedEquippedEmotes.Set(newEquippedEmotesList); |
| 0 | 284 | | } |
| | 285 | |
|
| | 286 | | internal void OnEmoteEquipped(string emoteId, int slotNumber) |
| | 287 | | { |
| 0 | 288 | | StoreEquippedEmotes(); |
| 0 | 289 | | onEmotePreviewed?.Invoke(emoteId); |
| 0 | 290 | | onEmoteEquipped?.Invoke(emoteId); |
| 0 | 291 | | } |
| | 292 | |
|
| | 293 | | internal void OnEmoteUnequipped(string emoteId, int slotNumber) |
| | 294 | | { |
| 0 | 295 | | StoreEquippedEmotes(); |
| 0 | 296 | | onEmoteUnequipped?.Invoke(emoteId); |
| 0 | 297 | | } |
| | 298 | |
|
| 0 | 299 | | internal void OnSellEmoteClicked(string emoteId) { onEmoteSell?.Invoke(emoteId); } |
| | 300 | |
|
| | 301 | | internal void OnSlotSelected(string emoteId, int slotNumber, bool playEmote) |
| | 302 | | { |
| 0 | 303 | | if (playEmote) |
| 0 | 304 | | onEmotePreviewed?.Invoke(emoteId); |
| 0 | 305 | | } |
| | 306 | |
|
| | 307 | | internal void ConfigureShortcuts() |
| | 308 | | { |
| 0 | 309 | | equipInputAction = Resources.Load<InputAction_Hold>("DefaultConfirmAction"); |
| 0 | 310 | | equipInputAction.OnFinished += OnEquipInputActionTriggered; |
| | 311 | |
|
| | 312 | | // showInfoInputAction = Resources.Load<InputAction_Hold>("ZoomIn"); |
| | 313 | | // showInfoInputAction.OnFinished += OnShowInfoInputActionTriggered; |
| | 314 | |
|
| 0 | 315 | | shortcut0InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut0"); |
| 0 | 316 | | shortcut0InputAction.OnTriggered += OnNumericShortcutInputActionTriggered; |
| | 317 | |
|
| 0 | 318 | | shortcut1InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut1"); |
| 0 | 319 | | shortcut1InputAction.OnTriggered += OnNumericShortcutInputActionTriggered; |
| | 320 | |
|
| 0 | 321 | | shortcut2InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut2"); |
| 0 | 322 | | shortcut2InputAction.OnTriggered += OnNumericShortcutInputActionTriggered; |
| | 323 | |
|
| 0 | 324 | | shortcut3InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut3"); |
| 0 | 325 | | shortcut3InputAction.OnTriggered += OnNumericShortcutInputActionTriggered; |
| | 326 | |
|
| 0 | 327 | | shortcut4InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut4"); |
| 0 | 328 | | shortcut4InputAction.OnTriggered += OnNumericShortcutInputActionTriggered; |
| | 329 | |
|
| 0 | 330 | | shortcut5InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut5"); |
| 0 | 331 | | shortcut5InputAction.OnTriggered += OnNumericShortcutInputActionTriggered; |
| | 332 | |
|
| 0 | 333 | | shortcut6InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut6"); |
| 0 | 334 | | shortcut6InputAction.OnTriggered += OnNumericShortcutInputActionTriggered; |
| | 335 | |
|
| 0 | 336 | | shortcut7InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut7"); |
| 0 | 337 | | shortcut7InputAction.OnTriggered += OnNumericShortcutInputActionTriggered; |
| | 338 | |
|
| 0 | 339 | | shortcut8InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut8"); |
| 0 | 340 | | shortcut8InputAction.OnTriggered += OnNumericShortcutInputActionTriggered; |
| | 341 | |
|
| 0 | 342 | | shortcut9InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut9"); |
| 0 | 343 | | shortcut9InputAction.OnTriggered += OnNumericShortcutInputActionTriggered; |
| 0 | 344 | | } |
| | 345 | |
|
| | 346 | | internal void OnEquipInputActionTriggered(DCLAction_Hold action) |
| | 347 | | { |
| 0 | 348 | | if (!isEmotesCustomizationSectionOpen || view.selectedCard == null || view.selectedCard.model.isLoading) |
| 0 | 349 | | return; |
| | 350 | |
|
| 0 | 351 | | if (!view.selectedCard.model.isAssignedInSelectedSlot) |
| | 352 | | { |
| 0 | 353 | | view.EquipEmote( |
| | 354 | | view.selectedCard.model.id, |
| | 355 | | view.selectedCard.model.name, |
| | 356 | | view.selectedSlot); |
| | 357 | | } |
| | 358 | | else |
| | 359 | | { |
| 0 | 360 | | view.UnequipEmote( |
| | 361 | | view.selectedCard.model.id, |
| | 362 | | view.selectedSlot); |
| | 363 | | } |
| 0 | 364 | | } |
| | 365 | |
|
| | 366 | | internal void OnShowInfoInputActionTriggered(DCLAction_Hold action) |
| | 367 | | { |
| 0 | 368 | | if (!isEmotesCustomizationSectionOpen || view.selectedCard == null || !view.selectedCard.model.isCollectible |
| 0 | 369 | | return; |
| | 370 | |
|
| 0 | 371 | | view.OpenEmoteInfoPanel( |
| | 372 | | view.selectedCard.model, |
| | 373 | | view.selectedCard.rarityMark.gameObject.activeSelf ? view.selectedCard.rarityMark.color : Color.grey, |
| | 374 | | view.selectedCard.emoteInfoAnchor); |
| 0 | 375 | | } |
| | 376 | |
|
| | 377 | | internal void OnNumericShortcutInputActionTriggered(DCLAction_Trigger action) |
| | 378 | | { |
| 0 | 379 | | if (!isEmotesCustomizationSectionOpen || view.selectedCard == null || view.selectedCard.model.isLoading) |
| 0 | 380 | | return; |
| | 381 | |
|
| | 382 | | switch (action) |
| | 383 | | { |
| | 384 | | case DCLAction_Trigger.ToggleShortcut0: |
| 0 | 385 | | view.EquipEmote(view.selectedCard.model.id, view.selectedCard.model.name, 0); |
| 0 | 386 | | break; |
| | 387 | | case DCLAction_Trigger.ToggleShortcut1: |
| 0 | 388 | | view.EquipEmote(view.selectedCard.model.id, view.selectedCard.model.name, 1); |
| 0 | 389 | | break; |
| | 390 | | case DCLAction_Trigger.ToggleShortcut2: |
| 0 | 391 | | view.EquipEmote(view.selectedCard.model.id, view.selectedCard.model.name, 2); |
| 0 | 392 | | break; |
| | 393 | | case DCLAction_Trigger.ToggleShortcut3: |
| 0 | 394 | | view.EquipEmote(view.selectedCard.model.id, view.selectedCard.model.name, 3); |
| 0 | 395 | | break; |
| | 396 | | case DCLAction_Trigger.ToggleShortcut4: |
| 0 | 397 | | view.EquipEmote(view.selectedCard.model.id, view.selectedCard.model.name, 4); |
| 0 | 398 | | break; |
| | 399 | | case DCLAction_Trigger.ToggleShortcut5: |
| 0 | 400 | | view.EquipEmote(view.selectedCard.model.id, view.selectedCard.model.name, 5); |
| 0 | 401 | | break; |
| | 402 | | case DCLAction_Trigger.ToggleShortcut6: |
| 0 | 403 | | view.EquipEmote(view.selectedCard.model.id, view.selectedCard.model.name, 6); |
| 0 | 404 | | break; |
| | 405 | | case DCLAction_Trigger.ToggleShortcut7: |
| 0 | 406 | | view.EquipEmote(view.selectedCard.model.id, view.selectedCard.model.name, 7); |
| 0 | 407 | | break; |
| | 408 | | case DCLAction_Trigger.ToggleShortcut8: |
| 0 | 409 | | view.EquipEmote(view.selectedCard.model.id, view.selectedCard.model.name, 8); |
| 0 | 410 | | break; |
| | 411 | | case DCLAction_Trigger.ToggleShortcut9: |
| 0 | 412 | | view.EquipEmote(view.selectedCard.model.id, view.selectedCard.model.name, 9); |
| | 413 | | break; |
| | 414 | | } |
| 0 | 415 | | } |
| | 416 | |
|
| | 417 | | internal virtual IEmotesCustomizationComponentView CreateView(string path = "EmotesCustomization/EmotesCustomiza |
| 0 | 418 | | EmotesCustomizationComponentView.Create(path); |
| | 419 | | } |
| | 420 | | } |