override public float Run() { if (whatToHighlight == WhatToHighlight.SceneObject && highlightObject == null) { return(0f); } if (whatToHighlight == WhatToHighlight.SceneObject) { if (highlightType == HighlightType.Enable) { if (isInstant) { highlightObject.HighlightOnInstant(); } else { highlightObject.HighlightOn(); } } else if (highlightType == HighlightType.Disable) { if (isInstant) { highlightObject.HighlightOffInstant(); } else { highlightObject.HighlightOff(); } } else if (highlightType == HighlightType.PulseOnce) { highlightObject.Flash(); } else if (highlightType == HighlightType.PulseContinually) { highlightObject.Pulse(); } } else { if (KickStarter.runtimeInventory) { if (highlightType == HighlightType.Enable && isInstant) { KickStarter.runtimeInventory.HighlightItemOnInstant(invID); return(0f); } else if (highlightType == HighlightType.Disable && isInstant) { KickStarter.runtimeInventory.HighlightItemOffInstant(); return(0f); } KickStarter.runtimeInventory.HighlightItem(invID, highlightType); } } return(0f); }
public override float Run() { if (whatToHighlight == WhatToHighlight.SceneObject && runtimeHighlightObject == null) { return(0f); } if (whatToHighlight == WhatToHighlight.SceneObject) { switch (highlightType) { case HighlightType.Enable: if (isInstant) { runtimeHighlightObject.HighlightOnInstant(); } else { runtimeHighlightObject.HighlightOn(); } break; case HighlightType.Disable: if (isInstant) { runtimeHighlightObject.HighlightOffInstant(); } else { runtimeHighlightObject.HighlightOff(); } break; case HighlightType.PulseOnce: runtimeHighlightObject.Flash(); break; case HighlightType.PulseContinually: runtimeHighlightObject.Pulse(); break; default: break; } } else { if (KickStarter.runtimeInventory) { if (highlightType == HighlightType.Enable && isInstant) { KickStarter.runtimeInventory.HighlightItemOnInstant(invID); return(0f); } else if (highlightType == HighlightType.Disable && isInstant) { KickStarter.runtimeInventory.HighlightItemOffInstant(); return(0f); } KickStarter.runtimeInventory.HighlightItem(invID, highlightType); } } return(0f); }