public Spell GetMagicSpell(string id) { if (!MagicSpells.ContainsKey(id)) { throw new GameDataException("Could not find magic spell with id " + id); } return(MagicSpells[id]); }
void Start() { //currMana = MaxMana; GM = GameObject.Find("GameManager"); MS = GameObject.Find("PlayerFunctionality").GetComponent <MagicSpells>(); //ability2ImageFill.enabled = false; //ability3ImageFill.enabled = false; //ability4ImageFill.enabled = false; //LightningImageFill.enabled = false; }
public IEnumerable <Spell> GetMagicSpells() { return(MagicSpells.Select(x => x.Value).OrderBy(x => x.Order)); }
void Orbit() { Vector2 orbitPos = (Vector2)transform.position; transform.position = orbitPos + (MagicSpells.ToVect(MagicSpells.ToAng(orbitPos, transform.position) + orbitSpeed) * orbitRadii); }