public static ControllerState GetControllerState(SvrControllerState index) { if (instance == null) { return(new ControllerState(SvrControllerIndex.SVR_CONTROLLER_INDEX_RIGHT)); } instance.Update(); switch (index) { case SvrControllerState.GvrController: return(instance.controllerStateRight); case SvrControllerState.NoloLeftContoller: return(instance.controllerStateLeft); case SvrControllerState.NoloRightContoller: return(instance.controllerStateRight); case SvrControllerState.NoloHead: return(instance.controllerStateHead); default: return(new ControllerState(SvrControllerIndex.SVR_CONTROLLER_INDEX_RIGHT)); } }