private CustomInputAxis ParseAxis(XElement xml) { CustomInputAxis axis = new EmptyAxis(); switch (xml.Name.LocalName) { case "buttonAxis": axis = new ButtonInputAxis(); break; case "emptyAxis": axis = new EmptyAxis(); break; case "keyAxis": axis = new KeyInputAxis(); break; case "simpleAxis": axis = new SimpleInputAxis(); break; } axis.Deserialize(xml); return(axis); }
public CustomInput() { axis = new CustomInputAxis[10]; for (int i = 0; i < axis.Length; i++) { axis[i] = new EmptyAxis(); } }