Пример #1
0
    string GetAbilityDescription(int slot)
    {
        int    id   = pinfo.GetAbilityID(slot);
        string desc = "";

        //Debug.Log("SLOT" + slot+"ID"+id);
        switch (id)
        {
        case 1:     //frenzy
            Frenzy frenzy = (Frenzy)pinfo.abilities[slot];
            frenzy.CalculateMult();
            desc = frenzy.GetDescription();
            break;

        case 2:     //rage
            Rage rage = (Rage)pinfo.abilities[slot];
            rage.CalculateMult();
            desc = rage.GetDescription();
            break;


        case 3:     //Mine
            Mine mine = (Mine)pinfo.abilities[slot];
            mine.CalculateDamage();
            desc = mine.GetDescription();
            break;

        case 4:     //Mine
            Fireball fireball = (Fireball)pinfo.abilities[slot];
            fireball.CalculateDamage();
            desc = fireball.GetDescription();
            break;
        }
        return(desc);
    }
Пример #2
0
    public void UpdateAbilityData(int slot)
    {
        int id = abilities[slot].GetID();

        switch (id)
        {
        case 1:
            Frenzy frenzy = (Frenzy)abilities[slot];
            frenzy.CalculateMult();
            break;

        case 2:
            Rage rage = (Rage)abilities[slot];
            rage.CalculateMult();
            break;

        case 3:
            Mine mine = (Mine)abilities[slot];
            mine.CalculateDamage();
            break;

        case 4:
            Fireball fireball = (Fireball)abilities[slot];
            fireball.CalculateDamage();
            break;
        }
    }
Пример #3
0
 // Use this for initialization
 void Start()
 {
     pcon = GameObject.Find("Player").GetComponent <PlayerController>();
     //AssetsLib = GameObject.Find("Assets").GetComponent<AssetsLibrary>();
     anim    = GetComponent <Animator>();
     blasted = false;
     GetMineStats();
     mine.CalculateDamage();
 }
Пример #4
0
 void GetMineStats()
 {
     for (int i = 0; i < pcon.pinfo.abilities.Length; i++)
     {
         int id = pcon.pinfo.abilities[i].GetID();
         if (id == 3) //since 3 is mine
         {
             mine = (Mine)pcon.pinfo.abilities[i];
             mine.CalculateDamage();
         }
     }
 }