public override void TriggerAction() { LightManager l = lightObject.GetComponent <LightManager> (); if (changeLightTo < l.Capacity()) { l.SetLight(changeLightTo, transitionTime); } else { Debug.LogError("Change light to " + changeLightTo + "exceed LightManager capacity (" + l.Capacity() + ")"); } }