示例#1
0
        public void Initialize()
        {
            var stream = Observable.FromEvent <PhotonNetwork.EventCallback, NetworkEventArgs> (
                h => (e, c, s) => h(new NetworkEventArgs()
            {
                eventCode = e, content = c, senderId = s
            }),
                h => PhotonNetwork.OnEventCall += h,
                h => PhotonNetwork.OnEventCall -= h
                );

            _context.SetEventStream(stream);
        }