Exemplo n.º 1
0
 protected void InitButton()
 {
     inputDetector          = GetComponent <InputDetector>();
     inputDetector.OnTouch += OnButtonPress;
     inputDetector.OnTouchReleaseAnywhere += OnButtonRelease;
     inputDetector.OnTouchAndRelease      += OnButtonPressAndRelease;
 }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     inputDetector                    = GetComponent <InputDetector>();
     inputDetector.OnTouch           += OnTouch;
     inputDetector.OnTouchRelease    += OnRelease;
     inputDetector.OnTouchAndRelease += OnTouchAndRelease;
 }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     if (singletonScripts != null)
     {
         inputDetector = (InputDetector)singletonScripts.GetComponent("InputDetector");
         webLoader     = singletonScripts.GetComponent <WebLoader>();
     }
 }
Exemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        inputDetector = GetComponent <InputDetector>();
        inputDetector.OnTouchReleaseAnywhere += OnTouchReleaseAnywhere;
        inputDetector.OnTouch += OnTouch;

        initialSize = this.transform.localScale;
    }
Exemplo n.º 5
0
 public override void AddAchievementOnStart()
 {
     if (achievementUnlocked == false)
     {
         inputDetector = new GameObject().AddComponent <InputDetector>();
         inputDetector.OnInputDetected += CheckAchievement;
     }
 }
Exemplo n.º 6
0
 // 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;
     }
 }
Exemplo n.º 7
0
 public static void NotifyDetectorOnIdle(InputDetector detector)
 {
     if (registeredDetectors.Contains(detector))
     {
         detectorRecords[detector] -= 1;
         if (detectorRecords[detector] == 0)
         {
             RemoveDetector(detector);
         }
     }
 }
Exemplo n.º 8
0
 // 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;
     }
 }
Exemplo n.º 9
0
 public static void NotifyDetectorOnBusy(InputDetector detector)
 {
     if (!registeredDetectors.Contains(detector))
     {
         detectorRecords[detector] = 1;
         RegisterDetector(detector);
     }
     else
     {
         detectorRecords[detector] += 1;
     }
 }
Exemplo n.º 10
0
 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);
     }
 }
Exemplo n.º 11
0
 // Use this for initialization
 void Start()
 {
     inputDetect = GetComponent <InputDetector>();
     controller  = GetComponent <PlayerController>();
 }
Exemplo n.º 12
0
 // Use this for initialization
 void Start()
 {
     if (singletonScripts != null) {
         inputDetector = (InputDetector) singletonScripts.GetComponent("InputDetector");
         webLoader = singletonScripts.GetComponent<WebLoader>();
     }
 }
Exemplo n.º 13
0
 protected virtual void Awake()
 {
     inputDetector          = GetComponent <InputDetector>();
     inputDetector.OnTouch += OnItemTouch;
     inputDetector.OnTouchReleaseAnywhere += OnTouchRelease;
 }
Exemplo n.º 14
0
 private static void RemoveDetector(InputDetector inputDetector)
 {
     inputDetector.Reset();
     registeredDetectors.Remove(inputDetector);
 }
Exemplo n.º 15
0
 private static void RegisterDetector(InputDetector inputDetector) => registeredDetectors.Add(inputDetector);