Пример #1
0
 void Awake()
 {
     if (instance != null)
     {
         Destroy(instance.gameObject);
     }
     instance = this;
 }
Пример #2
0
    public void die()
    {
        MayaMove MayaS = Maya.GetComponent <MayaMove>();

        MayaS.money += money;
        if (MayaS.XP + XP >= MayaS.xpNextLvl)
        {
            MayaS.LevelUp(XP);
        }
        else
        {
            MayaS.XP += XP;
        }
    }
Пример #3
0
    void Start()
    {
        fireball   = FindObjectOfType <SingleTargetSpell>();
        aoeSpell   = FindObjectOfType <Spell>();
        fireShield = FindObjectOfType <FireShield>();
        healSpell  = FindObjectOfType <HealSpell>();

        // fireball.addSpell(1);
        // aoeSpell.addSpell(2);
        // fireShield.addSpell(3);
        // healSpell.addSpell(4);

        FireballLvl          = 0;
        HealLvl              = 0;
        BurstballLvl         = 0;
        FirewalkLvl          = 0;
        FirearmorLvl         = 0;
        FirespikeLvl         = 0;
        MayaS                = GetComponent <MayaMove>();
        SpellsCanvas.enabled = false;
    }
Пример #4
0
 // Use this for initialization
 void Start()
 {
     MayaS             = GetComponent <MayaMove>();
     StatsCanvas.alpha = 0f;
 }