protected virtual void Awake() { extension = (extension != null) ? extension : GetComponent <AbstractMarketScreen>(); extension.Extensions += ActivateExtension; }
protected override void OnScreenFocus(AbstractMarketScreen screen) { screen.SetUI(null, this); }
private static void Hide(AbstractMarketScreen screen) { screen.Hide(); }
private static void Show(AbstractMarketScreen screen) { screen.Show(); }
/// <summary> /// Override to do additional functions when a screen is put in focus /// </summary> protected virtual void OnScreenFocus(AbstractMarketScreen screen) { }
/// <summary> /// Enable a given screen and disable all others /// </summary> public void PutScreenInFocus(AbstractMarketScreen screen) { screens.Screens.ForEach(Hide); Show(screen); OnScreenFocus(screen); }