Esempio n. 1
0
 public void DropCallBackLocalEvent(MyLib.MyEvent.EventType t, MyLib.EventDel cb)
 {
     MyLib.MyEventSystem.myEventSystem.DropLocalListener(photonView.GetLocalId(), t, cb);
     foreach (var e in regLocalEvtCallback)
     {
         if (e.t == t && e.cb == cb)
         {
             regLocalEvtCallback.Remove(e);
             break;
         }
     }
 }
Esempio n. 2
0
        public void AddCallBackLocalEvent(MyLib.MyEvent.EventType t, MyLib.EventDel cb)
        {
            regYet = true;
            if (regLocalEvtCallback == null)
            {
                regLocalEvtCallback = new List <EvtCbPair>();
            }

            regLocalEvtCallback.Add(new EvtCbPair()
            {
                t  = t,
                cb = cb,
            });
            MyLib.MyEventSystem.myEventSystem.RegisterLocalEvent(photonView.GetLocalId(), t, cb);
        }