Beispiel #1
0
 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;
 }
Beispiel #2
0
        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);
        }