Esempio n. 1
0
        public EventMysteryBoxOpened(CombinedWearables reward)
        {
            this.reward = reward;

            UnityEngine.Analytics.Analytics.CustomEvent(
                "MysteryBoxOpened",
                new Dictionary <string, object> {
                { "Mystery Box Reward", reward.ToString() }
            });
        }
        void BuyClothes(CombinedWearables wearable)
        {
            var coins = FindObjectOfType <Coin>();
            var price = clothingManager.GetPrice(wearable.rarity);

            if (coins.Coins < price)
            {
                FMODUnity.RuntimeManager.PlayOneShot("event:/SFX/buttonSoundMenu");
                return;
            }

            FMODUnity.RuntimeManager.PlayOneShot("event:/SFX/purchaseNewItem");
            coins.Coins -= price;
            UnityEngine.Analytics.Analytics.CustomEvent("Store", new Dictionary <string, object> {
                { "Purchased", wearable.ToString() }
            });
            EventBroker.Instance().SendMessage(new EventUpdatePlayerInventory(wearable, 1));
            EventBroker.Instance().SendMessage(new EventUpdateWearableHud());
        }
        public void OnPointerClick(PointerEventData eventData)
        {
            if (!popUpWindowIsActive)
            {
                if (GetComponent <CombinedWearables>().Amount == 0)
                {
                    EventBroker.Instance().SendMessage(new EventBuyNotOwnedClothes(combinedWearable));
                    return;
                }
                EventBroker.Instance().SendMessage(new EventClothesChanged(combinedWearable));
                UnityEngine.Analytics.Analytics.CustomEvent("Equip Cloths", new Dictionary <string, object> {
                    { "New Cloth", combinedWearable.ToString() }
                });
                return;
            }


            EventBroker.Instance().SendMessage(new EventAddToUpgradeSlot(combinedWearable));
            //EventBroker.Instance().SendMessage(new EventUpdateWearableHud());
        }
Esempio n. 4
0
 public static string GetName(CombinedWearables combinedWearable)
 {
     return(combinedWearable.ToString());
 }