void OnLevelMarkerHoverUpdated(LevelMarkerHoverUpdateEvent e) { UpdateContent(e.levelMarker); if (e.levelMarker != null) { trackedMarker = e.levelMarker; } if (e.levelMarker == null) { Fader.FadeOut(); } else { Fader.FadeIn(); } }
void UpdateContent(LevelMarker marker) { if (marker == null) { return; } LevelModel model = LevelStore.GetLevel(marker.LinkedLevelIndex); Title.text = model.LevelName; for (int i = 0; i < ChallengePanels.Length; i++) { ConfigureChallengePanel(i, ref model.Challenges); } for (int i = 0; i < ModifierPanels.Length; i++) { ConfigureModifierPanel(i, ref model.Conditions); } }
public LevelMarkerHoverUpdateEvent(LevelMarker levelMarker) { this.levelMarker = levelMarker; }
void OnLevelMarkerHoverUpdated(LevelMarkerHoverUpdateEvent e) { hoveredMarker = e.levelMarker; }
private void OnDestroy() { trackedMarker = null; EventSystem.Unsubscribe <LevelMarkerHoverUpdateEvent>(OnLevelMarkerHoverUpdated, this); }