public virtual void PressButton(GameObject other) { if (OnButtonEnter != null) { OnButtonEnter.Invoke(other); } }
public virtual void PressButton(GameObject other) { #if UNITY_EDITOR if (verbose) { print("button pressed"); } #endif if (OnButtonEnter != null) { OnButtonEnter.Invoke(other); } }
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); } }
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); } }