Exemplo n.º 1
0
    public void changeSpell()
    {
        spellSelected++;
        _spellSelected = spellSelected;
        if (GameManager.instace.weaponEquipped)
        {
            alabard = FindObjectOfType <alabardMaster>();
            alabard.activeAlabardParticle(spellSelected);
        }
        if (spellSelected >= GameManager.instace.intellect)
        {
            spellSelected = 0;
        }

        switch (spellSelected)
        {
        case 0:
            spellbox.sprite = spellIMG[spellSelected];
            break;

        case 1:
            spellbox.sprite = spellIMG[spellSelected];
            break;

        case 2:
            spellbox.sprite = spellIMG[spellSelected];
            break;

        case 3:
            spellbox.sprite = spellIMG[spellSelected];
            break;

        case 4:
            spellbox.sprite = spellIMG[spellSelected];
            break;

        case 5:
            spellbox.sprite = spellIMG[spellSelected];
            break;
        }
    }
Exemplo n.º 2
0
 private void Start()
 {
     spellbox = GameObject.FindGameObjectWithTag("spellbox").GetComponent <Image>();
     alabard  = GetComponent <alabardMaster>();
 }