void OnRequestShowControlls(FayvitCommandReaderEvent e) { Controlador c = (Controlador)e.MySendObjects[0]; if (c == Controlador.Android) { transform.parent.gameObject.SetActive(true); } }
void OnRequestHideControlls(FayvitCommandReaderEvent e) { if (moveJoy != null) { moveJoy.OnPointerUp(null); } if (camJoy) { camJoy.OnPointerUp(null); } Controlador c = (Controlador)e.MySendObjects[0]; if (c == Controlador.Android) { transform.parent.gameObject.SetActive(false); } }
public static void Publish(FayvitCR_EventKey key, FayvitCommandReaderEvent umEvento = null) { List <Action <FayvitCommandReaderEvent> > callbackList; if (_eventDictionary.TryGetValue(key, out callbackList)) { //Debug.Log(callbackList.Count+" : "+umEvento.Sender+" : "+key); foreach (var e in callbackList) { if (e != null) { e(umEvento); } else { Debug.LogWarning("Event agregator chamou uma função nula na key: " + key + "\r\n Geralmente ocorre quando o objeto do evento foi destruido sem se retirar do listener"); } } } }
public static void Publish(FayvitCommandReaderEvent e) { Publish(e.Key, e); }
private void OnChangeHardwareController(FayvitCommandReaderEvent e) { transform.parent.gameObject.SetActive((Controlador)e.MySendObjects[0] == Controlador.Android); }