Beispiel #1
0
 void onCanUpgrade(RuneType type)
 {
     //     Debug.Log("received on can upgrade");
     if (text.Equals("") || type.ToString().Equals(text))
     {
         selected = true;
     }
 }
Beispiel #2
0
    public void resetSkills(EffectType type, bool special)
    {
        if (special && !(toy_type == ToyType.Hero || toy_type == ToyType.Hero))
        {
            Debug.Log("Trying to reset special skills on a non-hero ToyType. Stop.\n");
            return;
        }
        if (!special && runetype == RuneType.Castle)
        {
            Debug.Log("Trying to reset a regular skills on the castle. Stop.\n");
            return;
        }

        if (special)
        {
            foreach (StatBit stat in stats)
            {
                if (!Get.isSpecial(stat.effect_type))
                {
                    continue;
                }
                if (type != EffectType.Null && type != stat.effect_type)
                {
                    continue;
                }
                Upgrade(stat.effect_type, true, true, true);
            }
        }
        else
        {
            if (type != EffectType.Null)
            {
                Debug.LogError("Resetting 1 regular skill is not supported!\n");
            }

            foreach (StatBit stat in stats)
            {
                if (Get.isSpecial(stat.effect_type) || Get.isBasic(stat.effect_type))
                {
                    continue;                                                                   //Get.isGeneric(stat.effect_type) ||
                }
                //    Debug.Log("Resetting skill " + stat.effect_type + "\n");
                Upgrade(stat.effect_type, true, true, true);
            }
        }

        Tracker.Log(PlayerEvent.ResetSkills, !special,
                    customAttributes: new Dictionary <string, string>()
        {
            { "attribute_2", Peripheral.Instance.difficulty.ToString() }, { "attribute_1", runetype.ToString() + " " + type.ToString() }
        },
                    customMetrics: new Dictionary <string, double>()
        {
            { "metric_2", order }
        });
    }