예제 #1
0
        public static void Update()
        {
            InputManager inputMan = InputManager.GetInstance();
            bool         spaceKey = Azul.Input.GetKeyState(Azul.AZUL_KEY.KEY_SPACE);

            if (spaceKey == true && inputMan.SpaceKeyPrev == false)
            {
                inputMan.SubjectSpacebar.NotifyObservers();
            }
            inputMan.SpaceKeyPrev = spaceKey;
            if (Azul.Input.GetKeyState(Azul.AZUL_KEY.KEY_ARROW_LEFT) == true)
            {
                inputMan.SubjectArrowLeft.NotifyObservers();
            }
            if (Azul.Input.GetKeyState(Azul.AZUL_KEY.KEY_ARROW_RIGHT) == true)
            {
                inputMan.SubjectArrowRight.NotifyObservers();
            }
            if (Azul.Input.GetKeyState(Azul.AZUL_KEY.KEY_1) == true)
            {
                inputMan.SubjectOne.NotifyObservers();
            }
            if (Azul.Input.GetKeyState(Azul.AZUL_KEY.KEY_2) == true)
            {
                inputMan.SubjectTwo.NotifyObservers();
            }
            inputMan.SpaceKeyPrev = spaceKey;
        }
        public static void SetActive(InputManager pIMan)
        {
            InputManager pMan = InputManager.GetInstance();

            Debug.Assert(pMan != null);

            Debug.Assert(pIMan != null);
            InputManager.pActiveMan = pIMan;
        }
예제 #3
0
        public static InputSubject GetTwoSubject()
        {
            InputManager inputMan = InputManager.GetInstance();

            return(inputMan.SubjectTwo);
        }
예제 #4
0
        public static InputSubject GetSpaceSubject()
        {
            InputManager inputMan = InputManager.GetInstance();

            return(inputMan.SubjectSpacebar);
        }
예제 #5
0
        public static InputSubject GetArrowRightSubject()
        {
            InputManager inputMan = InputManager.GetInstance();

            return(inputMan.SubjectArrowRight);
        }