Exemplo n.º 1
0
        public string GetStatText(OutfitVO outfit, string stat)
        {
            if (outfit == null)
            {
                return(null);
            }
            Dictionary <string, string> phrases = AmbitionApp.GetPhrases("outfit." + stat);

            if (phrases.Count == 0)
            {
                return("");
            }
            int value = outfit.GetIntStat(stat);

            switch (stat)
            {
            case ItemConsts.NOVELTY:
                value = (int)(.099f * phrases.Count * value);
                break;

            case ItemConsts.MODESTY:
            case ItemConsts.LUXURY:
                value = (int)Mathf.Floor(.00499f * phrases.Count * (value + 100));
                break;
            }
            return(new List <string>(phrases.Values)[value]);
        }
Exemplo n.º 2
0
        private void HandleEquip(ItemVO item)
        {
            OutfitVO outfit = item as OutfitVO;

            if (outfit != null)
            {
                int value = outfit.GetIntStat(Stat);
                if (Stat != ItemConsts.NOVELTY)
                {
                    value = (int)((100 + value) >> 1);
                }
                StopAllCoroutines();
                ValueText.text = value.ToString();
                StartCoroutine(Fill(value));
            }
        }