public static AxisKey XboxAxis(XboxAxis axis) { AxisKey ak = new AxisKey(); ak.Type = ControlKeyType.Xbox; ak.xboxAxisType = XboxAxisType.axis; ak.keys.Add(axis.ToString()); return ak; }
public static AxisKey XboxAxis(XboxAxis axis) { AxisKey ak = new AxisKey(); ak.Type = ControlKeyType.Xbox; ak.xboxAxisType = XboxAxisType.axis; ak.keys.Add(axis.ToString()); return(ak); }
void AxisControlsXInput(int i) { XboxAxis val = myXCIAxis[i].GetXAxisValue(); float axisVal = XCI.GetAxis(val, xboxController); if (axisVal != 0) { if (s_GameManager.ShowDebug() || ShowDebug) { Debug.Log(val.ToString() + " is value of " + axisVal); } myXCIAxis[i].Execute(axisVal); } else { myXCIAxis[i].Execute0(axisVal); } }
public static int resetAmmo(XboxAxis axis) { for (int i = 0; i < buttonList.Count; i++) { if (buttonList[i] is UITrigger) { Debug.Log("iterating"); UITrigger tmp = (UITrigger)buttonList[i]; if (tmp.axis == axis) { tmp.ammo = tmp.fullAmmo; buttonList[i] = tmp; callUpdateAmmoAmount(i, tmp.fullAmmo); Debug.Log("reset ammo with " + tmp.ammo); return(tmp.ammo); } else { Debug.Log("tmp : " + tmp.axis.ToString() + "requested: " + axis.ToString()); } } } return(-1); }