Exemplo n.º 1
0
        public void NetworkCreateObject(NetWorker networker, int identity, uint id, FrameStream frame, System.Action <NetworkObject> callback)
        {
            bool          availableCallback = false;
            NetworkObject obj = null;

            switch (identity)
            {
            case ConsoleNetworkObject.IDENTITY:
                availableCallback = true;
                obj = new ConsoleNetworkObject(networker, id, frame);
                if (callback != null)
                {
                    callback(obj);
                }
                break;
            }

            if (!availableCallback && callback != null)
            {
                callback(obj);
            }
        }
 public void Initialize(NetworkObject obj)
 {
     networkObject = (ConsoleNetworkObject)obj;
     networkObject.RegisterRpc("HelloWorld", HelloWorld, typeof(string));
     networkObject.RegistrationComplete();
 }