public bool setInput(Hotkey negative, Hotkey postive) { //Argument Checking if (negative == null || postive == null || negative == postive) return false; mIsAxis = false; mIsKeys = true; mNegative = negative; mPositive = postive; return true; }
public Axis(Hotkey negative, Hotkey positive) { setInput(negative, positive); }
/* * Sets the axis to a pair of keys * * Precondition: * 'negative' and 'postive' must not be the same key */ public bool setInput(Button negative, Button postive) { //Argument Checking if (negative == null || postive == null || negative == postive) return false; mIsAxis = false; mIsKeys = true; mNegative = new Hotkey(new[] { negative }); mPositive = new Hotkey(new[] { postive }); return true; }