void CurrentPointChanged(InteractionPoint pPreviousPoint) { ContextualHUD previousTargetHUD = null; ContextualHUD currentTargetHUD = null; if (pPreviousPoint != null) { if (PreviousPoint.Target != null && PreviousPoint.Target.GetComponent <ContextualHUD>() != null) { previousTargetHUD = pPreviousPoint.Target.GetComponent <ContextualHUD>(); } } if (CurrentPoint != null) { if (CurrentPoint.Target != null && CurrentPoint.Target.GetComponent <ContextualHUD>() != null) { currentTargetHUD = CurrentPoint.Target.GetComponent <ContextualHUD>(); } } if (pPreviousPoint != null && previousTargetHUD != null) { previousTargetHUD.Hide(); } if (CurrentPoint != null && currentTargetHUD != null) { currentTargetHUD.Show(); } }
void ShowPointHUD(InteractionPoint pPoint) { ContextualHUD targetHUD = null; if (pPoint != null && pPoint.Target != null && pPoint.Target.GetComponent <ContextualHUD>() != null) { targetHUD = pPoint.Target.GetComponent <ContextualHUD>(); } if (targetHUD != null) { targetHUD.Show(); } }