Ejemplo n.º 1
0
        public override void EventCallback(string data)
        {
            string location = GetLocation(data);

            if (!string.IsNullOrEmpty(location))
            {
                //raise event
                NewLocation?.Invoke(location);
            }
        }
 public void Identify(RaycastHit hit)
 {
     if (hit.transform.CompareTag("Ground"))
     {
         NewLocation?.Invoke(hit.point);
     }
     else
     {
         InteractWithObject(hit.transform.gameObject);
     }
 }
 protected void ChildInvokeNewLocation(Vector3 location) //special method to call from Child/Inherited Class, uses this/Parent event call
 {
     NewLocation?.Invoke(location);
 }