public void PlayerInput(BUTTON inputButton) { int used; if (playerBars.TryGetValue("Used", out used)) { if (used != 0) { return; } } ButtonObjectAssoctiate result; if (DisplayBarsDict.TryGetValue(inputButton, out result)) { int pressed; if (enemyBars.TryGetValue(inputButton.ToString(), out pressed)) { playerBars["Used"] = 1; playerBars[inputButton.ToString()] = 1; SetColor(inputButton, Color.white); } else { playerBars["Used"] = 1; playerBars[inputButton.ToString()] = 1; result.obj.SetActive(true); } } }
//--------------------------------------------------- //Description // The interrupt handler funtion //--------------------------------------------------- static void InterruptHandler(uint data1, uint data2, DateTime time) { //Convert to the BUTTON enumerate value BUTTON btn = (BUTTON)data1; if (data2 == 0) { //Pop Debug.Print(btn.ToString() + ":Pop"); } else { //Push Debug.Print(btn.ToString() + ":Push"); } }
public static string Get(BUTTON button) { return(button.ToString().Replace('_', ' ')); }
// Update is called once per frame void Update() { GrabPunch(eButtonType.ToString()); }