public void ApplyEffect() { if (effect == null) { statusIcon.HideIcon(); Debug.LogError("effect is not defined"); return; } effect.ApplyEffect(); duration--; if (statusIcon == null) { Debug.LogError("No icon setup for " + effect.name); //SetIcon(CBT.EnableIconDynamically(effect)); return; } statusIcon.SetInfo(this); //redundant? if (IsFinished()) { statusIcon.HideIcon(); return; } }