private PinchInputDetector getDetector() { if (_detector != null) { return(_detector); } PrefabFactory.Parameter[] parameters = new PrefabFactory.Parameter[] { }; _detector = createInputDetector(_detectorPrefab, parameters); return(_detector); }
private ButtonInputDetector getDetector(KeyCode code) { ButtonInputDetector inputDetector; if (!_detectors.TryGetValue(code, out inputDetector)) { PrefabFactory.Parameter[] parameters = new PrefabFactory.Parameter[] { new PrefabFactory.Parameter(code) }; inputDetector = createInputDetector(_detectorPrefab, parameters); _detectors.Add(code, inputDetector); } return(inputDetector); }
private PointerButtonInputDetector getDetector(int index) { PointerButtonInputDetector inputDetector; if (!_detectors.TryGetValue(index, out inputDetector)) { PrefabFactory.Parameter[] parameters = new PrefabFactory.Parameter[] { new PrefabFactory.Parameter(index) }; inputDetector = createInputDetector(_detectorPrefab, parameters); _detectors.Add(index, inputDetector); } return(inputDetector); }
private ClickInputDetector getDetector(ClickPointerParameter parameter) { ClickInputDetector inputDetector; if (!_detectors.TryGetValue(parameter, out inputDetector)) { ClickInputDetectorParameter detectorParameter = new ClickInputDetectorParameter(_inputParameter, parameter); PrefabFactory.Parameter[] parameters = new PrefabFactory.Parameter[] { new PrefabFactory.Parameter(detectorParameter) }; inputDetector = createInputDetector(_detectorPrefab, parameters); _detectors.Add(parameter, inputDetector); } return(inputDetector); }