private static void RenderModel(InteractionUI interactionUi, Model model, StatueInteraction interaction, Camera camera, AnimatedCursor animatedCursor) { interactionUi.UpdateCursor(model.HitPosition, model.HitNormal, camera); var showCustomCursor = model.CurrentCursorState == Model.CursorState.DwellTimer; interactionUi.SetCursorVisible(showCustomCursor); animatedCursor.gameObject.SetActive(!showCustomCursor); RenderHighlightParticles(model, interaction, interactionUi); ToggleInteractiveSegments(model, interaction); }
private static void RenderHighlightParticles(Model model, StatueInteraction interaction, InteractionUI interactionUi) { if (model.IsInGuidedModeOrInMixedModeGuided()) { //particles on next segment var nextSegment = model.GetSegmentToGuideTo(); interactionUi.UpdateHighlightedMeshRenderer(nextSegment != null ? interaction.GetMeshRender(nextSegment.Value) : null); } else { //particles on hovered segment if (model.CurrentCursorState == Model.CursorState.DwellTimer) { interactionUi.UpdateHighlightedMeshRenderer(interaction.GetMeshRender(model.HoveredSegment.Value)); } else { interactionUi.UpdateHighlightedMeshRenderer(null); } } }