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; }
public static InputSubject GetTwoSubject() { InputManager inputMan = InputManager.GetInstance(); return(inputMan.SubjectTwo); }
public static InputSubject GetSpaceSubject() { InputManager inputMan = InputManager.GetInstance(); return(inputMan.SubjectSpacebar); }
public static InputSubject GetArrowRightSubject() { InputManager inputMan = InputManager.GetInstance(); return(inputMan.SubjectArrowRight); }