| | 1 | | using System; |
| | 2 | | using System.Collections.Generic; |
| | 3 | | using System.Linq; |
| | 4 | | using UnityEngine; |
| | 5 | |
|
| | 6 | | namespace DCL.EmotesCustomization |
| | 7 | | { |
| | 8 | | public class EmotesCustomizationComponentController : IEmotesCustomizationComponentController |
| | 9 | | { |
| | 10 | | internal const int NUMBER_OF_SLOTS = 10; |
| | 11 | |
|
| 48 | 12 | | internal bool isEmotesCustomizationSectionOpen => exploreV2DataStore.isOpen.Get() && view.isActive; |
| | 13 | |
|
| | 14 | | internal IEmotesCustomizationComponentView view; |
| | 15 | | internal InputAction_Hold equipInputAction; |
| | 16 | | internal InputAction_Hold showInfoInputAction; |
| | 17 | | internal InputAction_Trigger shortcut0InputAction; |
| | 18 | | internal InputAction_Trigger shortcut1InputAction; |
| | 19 | | internal InputAction_Trigger shortcut2InputAction; |
| | 20 | | internal InputAction_Trigger shortcut3InputAction; |
| | 21 | | internal InputAction_Trigger shortcut4InputAction; |
| | 22 | | internal InputAction_Trigger shortcut5InputAction; |
| | 23 | | internal InputAction_Trigger shortcut6InputAction; |
| | 24 | | internal InputAction_Trigger shortcut7InputAction; |
| | 25 | | internal InputAction_Trigger shortcut8InputAction; |
| | 26 | | internal InputAction_Trigger shortcut9InputAction; |
| | 27 | | internal readonly DataStore dataStore; |
| | 28 | | internal UserProfile userProfile; |
| | 29 | | internal BaseDictionary<string, WearableItem> catalog; |
| 63 | 30 | | internal BaseDictionary<string, EmoteCardComponentView> emotesInLoadingState = new BaseDictionary<string, EmoteC |
| | 31 | |
|
| | 32 | | internal DataStore_EmotesCustomization emotesCustomizationDataStore; |
| | 33 | | internal DataStore_Emotes emotesDataStore; |
| | 34 | | internal DataStore_ExploreV2 exploreV2DataStore; |
| | 35 | | internal DataStore_HUDs hudsDataStore; |
| | 36 | |
|
| | 37 | | public event Action<string> onEmotePreviewed; |
| | 38 | | public event Action<string> onEmoteEquipped; |
| | 39 | | public event Action<string> onEmoteUnequipped; |
| | 40 | | public event Action<string> onEmoteSell; |
| | 41 | |
|
| | 42 | | public IEmotesCustomizationComponentView Initialize( |
| | 43 | | DataStore_EmotesCustomization emotesCustomizationDataStore, |
| | 44 | | DataStore_Emotes emotesDataStore, |
| | 45 | | DataStore_ExploreV2 exploreV2DataStore, |
| | 46 | | DataStore_HUDs hudsDataStore, |
| | 47 | | UserProfile userProfile, |
| | 48 | | BaseDictionary<string, WearableItem> catalog) |
| | 49 | | { |
| 63 | 50 | | this.emotesCustomizationDataStore = emotesCustomizationDataStore; |
| 63 | 51 | | this.emotesDataStore = emotesDataStore; |
| 63 | 52 | | this.exploreV2DataStore = exploreV2DataStore; |
| 63 | 53 | | this.hudsDataStore = hudsDataStore; |
| | 54 | |
|
| 63 | 55 | | IEmotesCustomizationComponentView view = ConfigureView(); |
| 63 | 56 | | ConfigureUserProfileAndCatalog(userProfile, catalog); |
| 63 | 57 | | ConfigureShortcuts(); |
| | 58 | |
|
| 63 | 59 | | emotesCustomizationDataStore.equippedEmotes.OnSet += OnEquippedEmotesSet; |
| 63 | 60 | | OnEquippedEmotesSet(emotesCustomizationDataStore.equippedEmotes.Get()); |
| | 61 | |
|
| 63 | 62 | | return view; |
| | 63 | | } |
| | 64 | |
|
| | 65 | | public void RestoreEmoteSlots() |
| | 66 | | { |
| 1 | 67 | | emotesCustomizationDataStore.unsavedEquippedEmotes.Set(emotesCustomizationDataStore.equippedEmotes.Get()); |
| 1 | 68 | | UpdateEmoteSlots(); |
| 1 | 69 | | } |
| | 70 | |
|
| | 71 | | public void Dispose() |
| | 72 | | { |
| 15 | 73 | | view.onEmoteEquipped -= OnEmoteEquipped; |
| 15 | 74 | | view.onEmoteUnequipped -= OnEmoteUnequipped; |
| 15 | 75 | | view.onSellEmoteClicked -= OnSellEmoteClicked; |
| 15 | 76 | | view.onSlotSelected -= OnSlotSelected; |
| 15 | 77 | | exploreV2DataStore.isOpen.OnChange -= IsStarMenuOpenChanged; |
| 15 | 78 | | hudsDataStore.avatarEditorVisible.OnChange -= OnAvatarEditorVisibleChanged; |
| 15 | 79 | | emotesCustomizationDataStore.equippedEmotes.OnSet -= OnEquippedEmotesSet; |
| 15 | 80 | | catalog.OnAdded -= AddEmote; |
| 15 | 81 | | catalog.OnRemoved -= RemoveEmote; |
| 15 | 82 | | emotesDataStore.animations.OnAdded -= OnAnimationAdded; |
| 15 | 83 | | userProfile.OnInventorySet -= OnUserProfileInventorySet; |
| 15 | 84 | | userProfile.OnUpdate -= OnUserProfileUpdated; |
| 15 | 85 | | equipInputAction.OnFinished -= OnEquipInputActionTriggered; |
| 15 | 86 | | showInfoInputAction.OnFinished -= OnShowInfoInputActionTriggered; |
| 15 | 87 | | shortcut0InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered; |
| 15 | 88 | | shortcut1InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered; |
| 15 | 89 | | shortcut2InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered; |
| 15 | 90 | | shortcut3InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered; |
| 15 | 91 | | shortcut4InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered; |
| 15 | 92 | | shortcut5InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered; |
| 15 | 93 | | shortcut6InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered; |
| 15 | 94 | | shortcut7InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered; |
| 15 | 95 | | shortcut8InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered; |
| 15 | 96 | | shortcut9InputAction.OnTriggered -= OnNumericShortcutInputActionTriggered; |
| 15 | 97 | | } |
| | 98 | |
|
| | 99 | | internal void OnEquippedEmotesSet(IEnumerable<EquippedEmoteData> equippedEmotes) |
| | 100 | | { |
| 1420 | 101 | | foreach (EquippedEmoteData equippedEmote in equippedEmotes) |
| | 102 | | { |
| 644 | 103 | | if (equippedEmote == null || string.IsNullOrEmpty(equippedEmote.id)) |
| | 104 | | continue; |
| | 105 | |
|
| | 106 | | // TODO: We should avoid static calls and create injectable interfaces |
| 4 | 107 | | CatalogController.RequestWearable(equippedEmote.id); |
| | 108 | | } |
| | 109 | |
|
| 66 | 110 | | emotesCustomizationDataStore.unsavedEquippedEmotes.Set(equippedEmotes); |
| 66 | 111 | | UpdateEmoteSlots(); |
| 66 | 112 | | } |
| | 113 | |
|
| | 114 | | internal IEmotesCustomizationComponentView ConfigureView() |
| | 115 | | { |
| 63 | 116 | | view = CreateView(); |
| 63 | 117 | | view.onEmoteEquipped += OnEmoteEquipped; |
| 63 | 118 | | view.onEmoteUnequipped += OnEmoteUnequipped; |
| 63 | 119 | | view.onSellEmoteClicked += OnSellEmoteClicked; |
| 63 | 120 | | view.onSlotSelected += OnSlotSelected; |
| 63 | 121 | | exploreV2DataStore.isOpen.OnChange += IsStarMenuOpenChanged; |
| 63 | 122 | | hudsDataStore.avatarEditorVisible.OnChange += OnAvatarEditorVisibleChanged; |
| | 123 | |
|
| 63 | 124 | | return view; |
| | 125 | | } |
| | 126 | |
|
| 2 | 127 | | internal void IsStarMenuOpenChanged(bool currentIsOpen, bool previousIsOpen) { view.SetEmoteInfoPanelActive(fals |
| | 128 | |
|
| 92 | 129 | | internal void OnAvatarEditorVisibleChanged(bool current, bool previous) { view.SetActive(current); } |
| | 130 | |
|
| | 131 | | internal void ProcessCatalog() |
| | 132 | | { |
| 155 | 133 | | emotesCustomizationDataStore.currentLoadedEmotes.Set(new List<string>()); |
| 155 | 134 | | view.CleanEmotes(); |
| | 135 | |
|
| 155 | 136 | | using (var iterator = catalog.Get().GetEnumerator()) |
| | 137 | | { |
| 5125 | 138 | | while (iterator.MoveNext()) |
| | 139 | | { |
| 4970 | 140 | | AddEmote(iterator.Current.Key, iterator.Current.Value); |
| | 141 | | } |
| 155 | 142 | | } |
| 155 | 143 | | } |
| | 144 | |
|
| | 145 | | internal void AddEmote(string id, WearableItem wearable) |
| | 146 | | { |
| 4974 | 147 | | if (!wearable.IsEmote() || emotesCustomizationDataStore.currentLoadedEmotes.Contains(id)) |
| 4968 | 148 | | return; |
| | 149 | |
|
| 6 | 150 | | if (!wearable.data.tags.Contains(WearableLiterals.Tags.BASE_WEARABLE) && userProfile.GetItemAmount(id) == 0) |
| 0 | 151 | | return; |
| | 152 | |
|
| 6 | 153 | | emotesCustomizationDataStore.currentLoadedEmotes.Add(id); |
| 6 | 154 | | EmoteCardComponentModel emoteToAdd = ParseWearableItemIntoEmoteCardModel(wearable); |
| 6 | 155 | | EmoteCardComponentView newEmote = view.AddEmote(emoteToAdd); |
| | 156 | |
|
| 6 | 157 | | if (newEmote != null) |
| 0 | 158 | | newEmote.SetAsLoading(true); |
| | 159 | |
|
| 6 | 160 | | if (!emotesInLoadingState.ContainsKey(id)) |
| 4 | 161 | | emotesInLoadingState.Add(id, newEmote); |
| | 162 | |
|
| 6 | 163 | | RefreshEmoteLoadingState(id); |
| | 164 | |
|
| 6 | 165 | | UpdateEmoteSlots(); |
| 6 | 166 | | } |
| | 167 | |
|
| | 168 | | internal void RemoveEmote(string id, WearableItem wearable) |
| | 169 | | { |
| 1 | 170 | | emotesCustomizationDataStore.currentLoadedEmotes.Remove(id); |
| 1 | 171 | | view.RemoveEmote(id); |
| 1 | 172 | | UpdateEmoteSlots(); |
| 1 | 173 | | } |
| | 174 | |
|
| 2 | 175 | | internal void OnAnimationAdded((string bodyshapeId, string emoteId) values, AnimationClip animationClip) { Refre |
| | 176 | |
|
| | 177 | | internal void RefreshEmoteLoadingState(string emoteId) |
| | 178 | | { |
| 8 | 179 | | if (emotesDataStore.animations.ContainsKey((userProfile.avatar.bodyShape, emoteId))) |
| | 180 | | { |
| 2 | 181 | | emotesInLoadingState.TryGetValue(emoteId, out EmoteCardComponentView emote); |
| 2 | 182 | | if (emote != null) |
| | 183 | | { |
| 1 | 184 | | emote.SetAsLoading(false); |
| 1 | 185 | | emotesInLoadingState.Remove(emoteId); |
| | 186 | | } |
| | 187 | | } |
| 8 | 188 | | } |
| | 189 | |
|
| | 190 | | internal EmoteCardComponentModel ParseWearableItemIntoEmoteCardModel(WearableItem wearable) |
| | 191 | | { |
| 7 | 192 | | return new EmoteCardComponentModel |
| | 193 | | { |
| | 194 | | id = wearable.id, |
| | 195 | | name = wearable.GetName(), |
| | 196 | | description = wearable.description, |
| | 197 | | pictureUri = wearable.ComposeThumbnailUrl(), |
| | 198 | | pictureSprite = wearable.thumbnailSprite, |
| | 199 | | isAssignedInSelectedSlot = false, |
| | 200 | | isSelected = false, |
| | 201 | | assignedSlot = -1, |
| | 202 | | rarity = wearable.rarity, |
| | 203 | | isInL2 = wearable.IsInL2(), |
| | 204 | | isLoading = false, |
| | 205 | | isCollectible = wearable.IsCollectible() |
| | 206 | | }; |
| | 207 | | } |
| | 208 | |
|
| | 209 | | internal void ConfigureUserProfileAndCatalog(UserProfile userProfile, BaseDictionary<string, WearableItem> catal |
| | 210 | | { |
| 63 | 211 | | this.userProfile = userProfile; |
| 63 | 212 | | this.catalog = catalog; |
| | 213 | |
|
| 63 | 214 | | this.userProfile.OnInventorySet += OnUserProfileInventorySet; |
| 63 | 215 | | this.userProfile.OnUpdate += OnUserProfileUpdated; |
| | 216 | |
|
| 63 | 217 | | OnUserProfileUpdated(this.userProfile); |
| 63 | 218 | | } |
| | 219 | |
|
| | 220 | | internal void OnUserProfileUpdated(UserProfile userProfile) |
| | 221 | | { |
| 261 | 222 | | if (string.IsNullOrEmpty(userProfile.userId)) |
| 245 | 223 | | return; |
| | 224 | |
|
| 16 | 225 | | this.userProfile.OnUpdate -= OnUserProfileUpdated; |
| 16 | 226 | | catalog.OnAdded += AddEmote; |
| 16 | 227 | | catalog.OnRemoved += RemoveEmote; |
| 16 | 228 | | emotesDataStore.animations.OnAdded += OnAnimationAdded; |
| | 229 | |
|
| 16 | 230 | | ProcessCatalog(); |
| 16 | 231 | | } |
| | 232 | |
|
| 276 | 233 | | internal void OnUserProfileInventorySet(Dictionary<string, int> inventory) { ProcessCatalog(); } |
| | 234 | |
|
| | 235 | | internal void UpdateEmoteSlots() |
| | 236 | | { |
| 1586 | 237 | | for (int i = 0; i < emotesCustomizationDataStore.unsavedEquippedEmotes.Count(); i++) |
| | 238 | | { |
| 718 | 239 | | if (i > NUMBER_OF_SLOTS) |
| | 240 | | break; |
| | 241 | |
|
| 718 | 242 | | if (emotesCustomizationDataStore.unsavedEquippedEmotes[i] == null) |
| | 243 | | { |
| 710 | 244 | | EmoteSlotCardComponentView existingEmoteIntoSlot = view.GetSlot(i); |
| 710 | 245 | | if (existingEmoteIntoSlot != null) |
| 490 | 246 | | view.UnequipEmote(existingEmoteIntoSlot.model.emoteId, i, false); |
| | 247 | |
|
| 490 | 248 | | continue; |
| | 249 | | } |
| | 250 | |
|
| 8 | 251 | | catalog.TryGetValue(emotesCustomizationDataStore.unsavedEquippedEmotes[i].id, out WearableItem emoteItem |
| 8 | 252 | | if (emoteItem != null && emotesCustomizationDataStore.currentLoadedEmotes.Contains(emoteItem.id)) |
| 2 | 253 | | view.EquipEmote(emoteItem.id, emoteItem.GetName(), i, false, false); |
| | 254 | | } |
| 75 | 255 | | } |
| | 256 | |
|
| | 257 | | internal void StoreEquippedEmotes() |
| | 258 | | { |
| 2 | 259 | | List<EquippedEmoteData> newEquippedEmotesList = new List<EquippedEmoteData> { null, null, null, null, null, |
| | 260 | |
|
| 2 | 261 | | if (view.currentSlots != null) |
| | 262 | | { |
| 0 | 263 | | foreach (EmoteSlotCardComponentView slot in view.currentSlots) |
| | 264 | | { |
| 0 | 265 | | if (!string.IsNullOrEmpty(slot.model.emoteId)) |
| 0 | 266 | | newEquippedEmotesList[slot.model.slotNumber] = new EquippedEmoteData |
| | 267 | | { |
| | 268 | | id = slot.model.emoteId, |
| | 269 | | cachedThumbnail = slot.model.pictureSprite |
| | 270 | | }; |
| | 271 | | } |
| | 272 | | } |
| | 273 | |
|
| 2 | 274 | | emotesCustomizationDataStore.unsavedEquippedEmotes.Set(newEquippedEmotesList); |
| 2 | 275 | | } |
| | 276 | |
|
| | 277 | | internal void OnEmoteEquipped(string emoteId, int slotNumber) |
| | 278 | | { |
| 1 | 279 | | StoreEquippedEmotes(); |
| 1 | 280 | | onEmotePreviewed?.Invoke(emoteId); |
| 1 | 281 | | onEmoteEquipped?.Invoke(emoteId); |
| 1 | 282 | | } |
| | 283 | |
|
| | 284 | | internal void OnEmoteUnequipped(string emoteId, int slotNumber) |
| | 285 | | { |
| 1 | 286 | | StoreEquippedEmotes(); |
| 1 | 287 | | onEmoteUnequipped?.Invoke(emoteId); |
| 1 | 288 | | } |
| | 289 | |
|
| 2 | 290 | | internal void OnSellEmoteClicked(string emoteId) { onEmoteSell?.Invoke(emoteId); } |
| | 291 | |
|
| 2 | 292 | | internal void OnSlotSelected(string emoteId, int slotNumber) { onEmotePreviewed?.Invoke(emoteId); } |
| | 293 | |
|
| | 294 | | internal void ConfigureShortcuts() |
| | 295 | | { |
| 63 | 296 | | equipInputAction = Resources.Load<InputAction_Hold>("DefaultConfirmAction"); |
| 63 | 297 | | equipInputAction.OnFinished += OnEquipInputActionTriggered; |
| | 298 | |
|
| 63 | 299 | | showInfoInputAction = Resources.Load<InputAction_Hold>("ZoomIn"); |
| 63 | 300 | | showInfoInputAction.OnFinished += OnShowInfoInputActionTriggered; |
| | 301 | |
|
| 63 | 302 | | shortcut0InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut0"); |
| 63 | 303 | | shortcut0InputAction.OnTriggered += OnNumericShortcutInputActionTriggered; |
| | 304 | |
|
| 63 | 305 | | shortcut1InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut1"); |
| 63 | 306 | | shortcut1InputAction.OnTriggered += OnNumericShortcutInputActionTriggered; |
| | 307 | |
|
| 63 | 308 | | shortcut2InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut2"); |
| 63 | 309 | | shortcut2InputAction.OnTriggered += OnNumericShortcutInputActionTriggered; |
| | 310 | |
|
| 63 | 311 | | shortcut3InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut3"); |
| 63 | 312 | | shortcut3InputAction.OnTriggered += OnNumericShortcutInputActionTriggered; |
| | 313 | |
|
| 63 | 314 | | shortcut4InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut4"); |
| 63 | 315 | | shortcut4InputAction.OnTriggered += OnNumericShortcutInputActionTriggered; |
| | 316 | |
|
| 63 | 317 | | shortcut5InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut5"); |
| 63 | 318 | | shortcut5InputAction.OnTriggered += OnNumericShortcutInputActionTriggered; |
| | 319 | |
|
| 63 | 320 | | shortcut6InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut6"); |
| 63 | 321 | | shortcut6InputAction.OnTriggered += OnNumericShortcutInputActionTriggered; |
| | 322 | |
|
| 63 | 323 | | shortcut7InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut7"); |
| 63 | 324 | | shortcut7InputAction.OnTriggered += OnNumericShortcutInputActionTriggered; |
| | 325 | |
|
| 63 | 326 | | shortcut8InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut8"); |
| 63 | 327 | | shortcut8InputAction.OnTriggered += OnNumericShortcutInputActionTriggered; |
| | 328 | |
|
| 63 | 329 | | shortcut9InputAction = Resources.Load<InputAction_Trigger>("ToggleShortcut9"); |
| 63 | 330 | | shortcut9InputAction.OnTriggered += OnNumericShortcutInputActionTriggered; |
| 63 | 331 | | } |
| | 332 | |
|
| | 333 | | internal void OnEquipInputActionTriggered(DCLAction_Hold action) |
| | 334 | | { |
| 48 | 335 | | if (!isEmotesCustomizationSectionOpen || view.selectedCard == null || view.selectedCard.model.isLoading) |
| 48 | 336 | | return; |
| | 337 | |
|
| 0 | 338 | | if (!view.selectedCard.model.isAssignedInSelectedSlot) |
| | 339 | | { |
| 0 | 340 | | view.EquipEmote( |
| | 341 | | view.selectedCard.model.id, |
| | 342 | | view.selectedCard.model.name, |
| | 343 | | view.selectedSlot); |
| 0 | 344 | | } |
| | 345 | | else |
| | 346 | | { |
| 0 | 347 | | view.UnequipEmote( |
| | 348 | | view.selectedCard.model.id, |
| | 349 | | view.selectedSlot); |
| | 350 | | } |
| 0 | 351 | | } |
| | 352 | |
|
| | 353 | | internal void OnShowInfoInputActionTriggered(DCLAction_Hold action) |
| | 354 | | { |
| 0 | 355 | | if (!isEmotesCustomizationSectionOpen || view.selectedCard == null || !view.selectedCard.model.isCollectible |
| 0 | 356 | | return; |
| | 357 | |
|
| 0 | 358 | | view.OpenEmoteInfoPanel( |
| | 359 | | view.selectedCard.model, |
| | 360 | | view.selectedCard.rarityMark.gameObject.activeSelf ? view.selectedCard.rarityMark.color : Color.grey, |
| | 361 | | view.selectedCard.emoteInfoAnchor); |
| 0 | 362 | | } |
| | 363 | |
|
| | 364 | | internal void OnNumericShortcutInputActionTriggered(DCLAction_Trigger action) |
| | 365 | | { |
| 0 | 366 | | if (!isEmotesCustomizationSectionOpen || view.selectedCard == null || view.selectedCard.model.isLoading) |
| 0 | 367 | | return; |
| | 368 | |
|
| | 369 | | switch (action) |
| | 370 | | { |
| | 371 | | case DCLAction_Trigger.ToggleShortcut0: |
| 0 | 372 | | view.EquipEmote(view.selectedCard.model.id, view.selectedCard.model.name, 0); |
| 0 | 373 | | break; |
| | 374 | | case DCLAction_Trigger.ToggleShortcut1: |
| 0 | 375 | | view.EquipEmote(view.selectedCard.model.id, view.selectedCard.model.name, 1); |
| 0 | 376 | | break; |
| | 377 | | case DCLAction_Trigger.ToggleShortcut2: |
| 0 | 378 | | view.EquipEmote(view.selectedCard.model.id, view.selectedCard.model.name, 2); |
| 0 | 379 | | break; |
| | 380 | | case DCLAction_Trigger.ToggleShortcut3: |
| 0 | 381 | | view.EquipEmote(view.selectedCard.model.id, view.selectedCard.model.name, 3); |
| 0 | 382 | | break; |
| | 383 | | case DCLAction_Trigger.ToggleShortcut4: |
| 0 | 384 | | view.EquipEmote(view.selectedCard.model.id, view.selectedCard.model.name, 4); |
| 0 | 385 | | break; |
| | 386 | | case DCLAction_Trigger.ToggleShortcut5: |
| 0 | 387 | | view.EquipEmote(view.selectedCard.model.id, view.selectedCard.model.name, 5); |
| 0 | 388 | | break; |
| | 389 | | case DCLAction_Trigger.ToggleShortcut6: |
| 0 | 390 | | view.EquipEmote(view.selectedCard.model.id, view.selectedCard.model.name, 6); |
| 0 | 391 | | break; |
| | 392 | | case DCLAction_Trigger.ToggleShortcut7: |
| 0 | 393 | | view.EquipEmote(view.selectedCard.model.id, view.selectedCard.model.name, 7); |
| 0 | 394 | | break; |
| | 395 | | case DCLAction_Trigger.ToggleShortcut8: |
| 0 | 396 | | view.EquipEmote(view.selectedCard.model.id, view.selectedCard.model.name, 8); |
| 0 | 397 | | break; |
| | 398 | | case DCLAction_Trigger.ToggleShortcut9: |
| 0 | 399 | | view.EquipEmote(view.selectedCard.model.id, view.selectedCard.model.name, 9); |
| | 400 | | break; |
| | 401 | | } |
| 0 | 402 | | } |
| | 403 | |
|
| 48 | 404 | | internal virtual IEmotesCustomizationComponentView CreateView() => EmotesCustomizationComponentView.Create(); |
| | 405 | | } |
| | 406 | | } |