protected void InitButton() { inputDetector = GetComponent <InputDetector>(); inputDetector.OnTouch += OnButtonPress; inputDetector.OnTouchReleaseAnywhere += OnButtonRelease; inputDetector.OnTouchAndRelease += OnButtonPressAndRelease; }
// Use this for initialization void Start() { inputDetector = GetComponent <InputDetector>(); inputDetector.OnTouch += OnTouch; inputDetector.OnTouchRelease += OnRelease; inputDetector.OnTouchAndRelease += OnTouchAndRelease; }
// Use this for initialization void Start() { if (singletonScripts != null) { inputDetector = (InputDetector)singletonScripts.GetComponent("InputDetector"); webLoader = singletonScripts.GetComponent <WebLoader>(); } }
// Use this for initialization void Start() { inputDetector = GetComponent <InputDetector>(); inputDetector.OnTouchReleaseAnywhere += OnTouchReleaseAnywhere; inputDetector.OnTouch += OnTouch; initialSize = this.transform.localScale; }
public override void AddAchievementOnStart() { if (achievementUnlocked == false) { inputDetector = new GameObject().AddComponent <InputDetector>(); inputDetector.OnInputDetected += CheckAchievement; } }
// Use this for initialization void Start() { if (scriptObject != null) { inputDetector = (InputDetector)scriptObject.GetComponent ("InputDetector"); ringMenu = (RingMenu)scriptObject.GetComponent ("RingMenu"); } if (userObject != null) { startingPosition = userObject.transform.position; } }
public static void NotifyDetectorOnIdle(InputDetector detector) { if (registeredDetectors.Contains(detector)) { detectorRecords[detector] -= 1; if (detectorRecords[detector] == 0) { RemoveDetector(detector); } } }
// Use this for initialization void Start() { if (scriptObject != null) { inputDetector = (InputDetector)scriptObject.GetComponent("InputDetector"); ringMenu = (RingMenu)scriptObject.GetComponent("RingMenu"); } if (userObject != null) { startingPosition = userObject.transform.position; } }
public static void NotifyDetectorOnBusy(InputDetector detector) { if (!registeredDetectors.Contains(detector)) { detectorRecords[detector] = 1; RegisterDetector(detector); } else { detectorRecords[detector] += 1; } }
public void Remap(string name, InputDetector detector) { if (_inputMap.ContainsKey(name)) { InputManager.NotifyDetectorOnIdle(_inputMap[name]); } if (detector != null) { InputManager.NotifyDetectorOnBusy(detector); _inputMap[name] = detector; } else { _inputMap.Remove(name); } }
// Use this for initialization void Start() { inputDetect = GetComponent <InputDetector>(); controller = GetComponent <PlayerController>(); }
// Use this for initialization void Start() { if (singletonScripts != null) { inputDetector = (InputDetector) singletonScripts.GetComponent("InputDetector"); webLoader = singletonScripts.GetComponent<WebLoader>(); } }
protected virtual void Awake() { inputDetector = GetComponent <InputDetector>(); inputDetector.OnTouch += OnItemTouch; inputDetector.OnTouchReleaseAnywhere += OnTouchRelease; }
private static void RemoveDetector(InputDetector inputDetector) { inputDetector.Reset(); registeredDetectors.Remove(inputDetector); }
private static void RegisterDetector(InputDetector inputDetector) => registeredDetectors.Add(inputDetector);