Exemple #1
0
 public virtual void PressButton(GameObject other)
 {
     if (OnButtonEnter != null)
     {
         OnButtonEnter.Invoke(other);
     }
 }
Exemple #2
0
        public virtual void PressButton(GameObject other)
        {
#if UNITY_EDITOR
            if (verbose)
            {
                print("button pressed");
            }
#endif
            if (OnButtonEnter != null)
            {
                OnButtonEnter.Invoke(other);
            }
        }
Exemple #3
0
        public void Disable()
        {
            GetComponent <Renderer>().material.color = disabledColor;
            foreach (ButtonCallBack b in OnButtonEnter.GetInvocationList())
            {
                OnButtonEnter -= b;
            }

            HighlightOnRaycast highlight = GetComponent <HighlightOnRaycast>();

            if (highlight != null)
            {
                Destroy(highlight);
            }
        }
Exemple #4
0
        public virtual void PressButton(GameObject other)
        {
#if UNITY_EDITOR
            if (verbose)
            {
                print("button pressed");
            }
#endif
            if (OnButtonEnter != null)
            {
                OnButtonEnter.Invoke(other);
            }

            string eventName = gameObject.name;
            var    extra     = new Dictionary <string, object>();
            extra["parent"] = gameObject.transform.parent.name;
            if (!eventName.Equals("Body"))
            {
                StatisticsTracking.StartEvent("Button Press", eventName, extra);
            }
        }