Ejemplo n.º 1
0
        [ConditionalShow, SerializeField] private bool useless; //在没有数据的时候让标题正常显示
#endif

        private void Awake()
        {
            NetworkSystem.OnUDPReceive    += val => OnUDPReceive?.Invoke(val.message);
            NetworkSystem.OnReceive       += val => OnReceive?.Invoke(val);
            NetworkSystem.OnConnection    += () => OnConnection?.Invoke();
            NetworkSystem.OnDisconnection += () => OnDisconnection?.Invoke();
        }
Ejemplo n.º 2
0
 public static void CallUDPReceive(UDPPacket packet) => OnUDPReceive?.Invoke(packet);