private void Awake() { temporalityInterface = GetComponentInChildren <TemporalityInterface>(); bulletinDisplay = GetComponentInChildren <BulletinDisplay>(); moodsDisplay = GetComponentInChildren <MoodsDisplay>(); tooltipController = GetComponentInChildren <TooltipGO>(); }
public void OnPointerExit(PointerEventData pointerEventData) { if (tooltipGO == null) { tooltipGO = FindObjectOfType <TooltipGO>(); } tooltipGO.Disable(); isActive = false; }
public void OnPointerEnter(PointerEventData pointerEventData) { if (tooltipGO == null) { tooltipGO = FindObjectOfType <TooltipGO>(); } tooltipGO.transform.position = pointerEventData.position; string txt = ""; for (int i = 0; i < locs.Count; i++) { if (i > 0) { txt += "\n"; } string newStr = ""; switch (locs[i].entry) { case entryType.LineBreak: continue; case entryType.Plaintext: newStr = locs[i].plaintext; break; case entryType.Localization: GameManager.instance.localization.SetCategory(locs[i].category); newStr = "<color=#" + ColorUtility.ToHtmlStringRGB(colors[(int)locs[i].type]) + ">" + GameManager.instance.localization.GetLine(locs[i].id, locs[i].values) + "</color>"; break; } if (i == 0 && isFirstLineBold) { newStr = "<b>" + newStr + "</b>"; } foreach (string formatter in locs[i].formatters) { newStr = "<" + formatter + ">" + newStr + "</" + formatter + ">"; } txt += newStr; } tooltipGO.SetText(txt); isActive = true; }
void FindAllReferences() { // SYSTEM if (temporality == null) { temporality = FindObjectOfType <Temporality>(); } if (flagReader == null) { flagReader = FindObjectOfType <FlagReader>(); } if (library == null) { library = FindObjectOfType <Library>(); } if (soundManager == null) { soundManager = FindObjectOfType <SoundManager>(); } if (systemManager == null) { systemManager = FindObjectOfType <SystemManager>(); } if (missionCallbackManager == null) { missionCallbackManager = FindObjectOfType <MissionCallbackManager>(); } if (missionManager == null) { missionManager = FindObjectOfType <MissionManager>(); } if (cursorManagement == null) { cursorManagement = FindObjectOfType <CursorManagement>(); } if (gridManagement == null) { gridManagement = FindObjectOfType <GridManagement>(); } if (populationManager == null) { populationManager = FindObjectOfType <PopulationManager>(); } if (saveManager == null) { saveManager = FindObjectOfType <SaveManager>(); } if (cinematicManager == null) { cinematicManager = FindObjectOfType <CinematicManager>(); } if (cityManager == null) { cityManager = FindObjectOfType <CityManager>(); } if (bulletinsManager == null) { bulletinsManager = FindObjectOfType <BulletinsManager>(); } if (overlayManager == null) { overlayManager = FindObjectOfType <OverlayManager>(); } if (timelineController == null) { timelineController = FindObjectOfType <TimelineController>(); } if (player == null) { player = FindObjectOfType <Player>(); } if (eventManager == null) { eventManager = FindObjectOfType <EventManager>(); } if (animationManager == null) { animationManager = FindObjectOfType <AnimationManager>(); } if (achievementManager == null) { achievementManager = FindObjectOfType <AchievementManager>(); } if (roamerManager == null) { roamerManager = FindObjectOfType <RoamerManager>(); } if (environmentalFX == null) { environmentalFX = FindObjectOfType <EnvironmentalFX>(); } // INTERFACE if (localization == null) { localization = FindObjectOfType <Localization>(); } if (displayerManager == null) { displayerManager = FindObjectOfType <DisplayerManager>(); } // INTERFACE - INGAME if (temporalityInterface == null) { temporalityInterface = FindObjectOfType <TemporalityInterface>(); } if (tooltipGO == null) { tooltipGO = FindObjectOfType <TooltipGO>(); } // DEBUG if (logger == null) { logger = FindObjectOfType <Logger>(); } }