public static InputSubject GetKeyThreeSubject() { InputMan pMan = InputMan.PrivGetInstance(); Debug.Assert(pMan != null); return(pMan.pSubjectThree); }
public static InputSubject GetArrowLeftSubject() { InputMan pMan = InputMan.PrivGetInstance(); Debug.Assert(pMan != null); return(pMan.pSubjectArrowLeft); }
public static InputSubject GetSlashSubject() { InputMan pMan = InputMan.PrivGetInstance(); Debug.Assert(pMan != null); return(pMan.pSubjectSlash); }
public static void Update() { InputMan pMan = InputMan.PrivGetInstance(); Debug.Assert(pMan != null); // LeftKey: (no history) ----------------------------------------------------------- if (Azul.Input.GetKeyState(Azul.AZUL_KEY.KEY_ARROW_LEFT) == true) { pMan.pSubjectArrowLeft.Notify(); } // RightKey: (no history) ----------------------------------------------------------- if (Azul.Input.GetKeyState(Azul.AZUL_KEY.KEY_ARROW_RIGHT) == true) { pMan.pSubjectArrowRight.Notify(); } if (Azul.Input.GetKeyState(Azul.AZUL_KEY.KEY_1) == true) { pMan.pSubjectOne.Notify(); } if (Azul.Input.GetKeyState(Azul.AZUL_KEY.KEY_2) == true) { pMan.pSubjectTwo.Notify(); } if (Azul.Input.GetKeyState(Azul.AZUL_KEY.KEY_3) == true) { pMan.pSubjectThree.Notify(); } // SpaceKey: (with key history) ----------------------------------------------------------- bool spaceKeyCurr = Azul.Input.GetKeyState(Azul.AZUL_KEY.KEY_SPACE); if (spaceKeyCurr == true && pMan.privSpaceKeyPrev == false) { pMan.pSubjectSpace.Notify(); } pMan.privSpaceKeyPrev = spaceKeyCurr; }
public static void Update() { InputMan pMan = InputMan.PrivGetInstance(); Debug.Assert(pMan != null); // LeftKey: (no history) ----------------------------------------------------------- if (Azul.Input.GetKeyState(Azul.AZUL_KEY.KEY_ARROW_LEFT) == true) { pMan.pSubjectArrowLeft.Notify(); } // RightKey: (no history) ----------------------------------------------------------- if (Azul.Input.GetKeyState(Azul.AZUL_KEY.KEY_ARROW_RIGHT) == true) { pMan.pSubjectArrowRight.Notify(); } // SpaceKey: (with key history) ----------------------------------------------------------- bool spaceKeyCurr = Azul.Input.GetKeyState(Azul.AZUL_KEY.KEY_SPACE); if (spaceKeyCurr == true && pMan.privSpaceKeyPrev == false) { pMan.pSubjectSpace.Notify(); } // Toggle the collision boxes --------------------------------- bool tKeyCurr = Azul.Input.GetKeyState(Azul.AZUL_KEY.KEY_T); if (tKeyCurr == true && pMan.privTKeyPrev == false) { pMan.pSubjectT.Notify(); } // Toggle the Shield --------------------------------- bool rKeyCurr = Azul.Input.GetKeyState(Azul.AZUL_KEY.KEY_R); if (rKeyCurr == true && pMan.privRKeyPrev == false) { pMan.pSubjectR.Notify(); } // start game bool oneKeyCurr = Azul.Input.GetKeyState(Azul.AZUL_KEY.KEY_1); if (oneKeyCurr == true && pMan.priv1KeyPrev == false) { pMan.pSubject1.Notify(); } bool twoKeyCurr = Azul.Input.GetKeyState(Azul.AZUL_KEY.KEY_2); if (twoKeyCurr == true && pMan.priv2KeyPrev == false) { pMan.pSubject2.Notify(); } bool slashKeyCurr = Azul.Input.GetKeyState(Azul.AZUL_KEY.KEY_SLASH); if (slashKeyCurr == true && pMan.privSLashKeyPrev == false) { pMan.pSubjectSlash.Notify(); } pMan.privSpaceKeyPrev = spaceKeyCurr; pMan.privTKeyPrev = tKeyCurr; pMan.privRKeyPrev = rKeyCurr; pMan.priv1KeyPrev = oneKeyCurr; pMan.priv2KeyPrev = twoKeyCurr; pMan.privSLashKeyPrev = slashKeyCurr; }