Exemplo n.º 1
0
        private void Awake()
        {
            var gameController = Utils.FindNovaGameController();

            gameState             = gameController.GameState;
            inputMapper           = gameController.InputMapper;
            viewManager           = Utils.FindViewManager();
            dialogueBoxController = viewManager.GetController <DialogueBoxController>();
        }
Exemplo n.º 2
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;
 }
Exemplo n.º 3
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);
        }
Exemplo n.º 4
0
 private void Awake()
 {
     inputMapper = Utils.FindNovaGameController().InputMapper;
 }
Exemplo n.º 5
0
 public void EnableInput()
 {
     inputEnabled = true;
     InputMapper.SetEnableGroup(AbstractKeyGroup.Game | AbstractKeyGroup.UI);
 }
Exemplo n.º 6
0
 // Disable all abstract keys except StepForward
 public void DisableInput()
 {
     inputEnabled = false;
     InputMapper.SetEnableGroup(AbstractKeyGroup.None);
     InputMapper.SetEnable(AbstractKey.StepForward, true);
 }