Exemplo n.º 1
0
 private void EventDispatcher(HandGestureEvent e)
 {
     if (e == null)
     {
         throw new NullReferenceException($"{nameof(HandGestureEvent)} can not be null, please check {nameof(MADUnityIntegrator)} logic.");
     }
     else if (e is HandDetected)
     {
         EventHandDetected?.Invoke((HandDetected)e);
     }
     else if (e is Click)
     {
         EventClick?.Invoke((Click)e);
     }
     else if (e is Grab)
     {
         EventGrab?.Invoke((Grab)e);
     }
     else if (e is Hold)
     {
         EventHold?.Invoke((Hold)e);
     }
     else
     {
         throw new NotImplementedException($"Fail to dispatch {nameof(HandGestureEvent)}, non implement type detected.");
     }
 }
Exemplo n.º 2
0
 public void RaisePostBackEvent(string eventArgument)
 {
     if (eventArgument.ToUpper().Contains("DAYCLICK"))
     {
         DayClick?.Invoke(this, new DayClickEventArgs()
         {
             Date = eventArgument.Replace("DAYCLICK*", "")
         });
     }
     else if (eventArgument.ToUpper().Contains("EVENTCLICK"))
     {
         EventClick?.Invoke(this, new EventClickEventArgs()
         {
             EventId = eventArgument.Replace("EVENTCLICK*", "")
         });
     }
 }
Exemplo n.º 3
0
 private void Start()
 {
     btnJoinRoom.onClick.AddListener(() =>
                                     ClickRoom.Invoke(txtRoomName.text)
                                     );
 }