///TODO: Instantiate all the canvas components to ensure they are loaded public CanvasManager Initialize(SpaceRoaches spaceRoaches) { _roachCount = GetComponentInChildren <RoachCount>(); _dashMeter = GetComponentInChildren <DashMeter>(); _endScreen = GetComponentInChildren <EndScreen>(); _endScreen.Initialize(_roachCount, spaceRoaches); InitializeAlertPopUp() .InitializeLoadingScreen(); return(this); }
///TODO: Instantiate all the canvas components to ensure they are loaded public CanvasManager Initialize(SpaceRoaches spaceRoaches) { _roachCount = GetComponentInChildren<RoachCount>(); _dashMeter = GetComponentInChildren<DashMeter>(); _endScreen = GetComponentInChildren<EndScreen>(); _endScreen.Initialize(_roachCount, spaceRoaches); InitializeAlertPopUp() .InitializeLoadingScreen(); return this; }
public EndScreen Initialize(RoachCount roachCount, SpaceRoaches spaceRoaches) { if (roachCount == null) { return(this); } _roachCount = roachCount; _spaceRoaches = spaceRoaches; _textCount = GetComponentsInChildren <Text>(true)[0]; _textComment = GetComponentsInChildren <Text>(true)[1]; _typeWriting = gameObject.AddComponent <TypeWriting>(); _selectEndScreenText = new SelectEndScreenText(); return(this); }