public void Update() { CastBar.UpdateProgress(); ClearInstantCasts(); lock (Buffs) { foreach (var buff in Buffs) { buff.UpdateProgress(); } } lock (Debuffs) { foreach (var debuff in Debuffs) { debuff.UpdateProgress(); } } }
/// <summary> /// Sets the castBar. /// </summary> /// <param name="Bar">The castBar.</param> public void SetCastBar(CastBar bar) { castBar = bar; }
// Start is called before the first frame update void Awake() { instance = this; }
void Awake() { castBar = transform.FindChild("Cast Bar").gameObject.GetComponent <CastBar>(); spellText = transform.FindChild("Spell Name").gameObject.GetComponent <Text>(); }