protected virtual void Awake() { this.RuntimeAssert(myPanel != null, "MyPanel is not set."); transitions = myPanel.GetComponents <UIViewTransitionBase>(); viewManager = GetComponentInParent <ViewManager>(); this.RuntimeAssert(viewManager != null, "Missing ViewManager in ancestors."); viewManager.SetController(this); inputMapper = Utils.FindNovaGameController().InputMapper; }
protected virtual bool Init() { if (inited) { return(true); } this.RuntimeAssert(myPanel != null, "MyPanel is not set."); transitions = myPanel.GetComponents <UIViewTransitionBase>().ToList(); viewManager = GetComponentInParent <ViewManager>(); this.RuntimeAssert(viewManager != null, "Missing ViewManager in parents."); viewManager.SetController(this); inputMapper = Utils.FindNovaGameController().InputMapper; inited = true; return(false); }