public virtual void initKBEngine() { // 如果此处发生错误,请查看 Assets\Scripts\kbe_scripts\if_Entity_error_use______git_submodule_update_____kbengine_plugins_______open_this_file_and_I_will_tell_you.cs KBEngineArgs args = new KBEngineArgs(); args.ip = ip; args.port = port; args.clientType = clientType; if(persistentDataPath == "Application.persistentDataPath") args.persistentDataPath = Application.persistentDataPath; else args.persistentDataPath = persistentDataPath; args.syncPlayer = syncPlayer; args.threadUpdateHZ = threadUpdateHZ; args.SEND_BUFFER_MAX = (UInt32)SEND_BUFFER_MAX; args.RECV_BUFFER_MAX = (UInt32)RECV_BUFFER_MAX; args.isMultiThreads = isMultiThreads; if(isMultiThreads) gameapp = new KBEngineAppThread(args); else gameapp = new KBEngineApp(args); }
public NetworkInterface(KBEngineApp app) { this.app_ = app; packets_ = new List <MemoryStream>(); Message.bindFixedMessage(); }
public KBEngineApp(ClientApp c) { client = c; app = this; //networkInterface_ = new NetworkInterface(this); kbethread = new KBEThread(this); }
// Use this for initialization void Start() { MonoBehaviour.print("clientapp::start()"); gameapp = new KBEngineApp(); //gameapp.createAccount_loginapp(true); // gameapp.login_loginapp(true); gameapp.autoImportMessagesFromServer(true); }
public KBEngineApp() { app = this; networkInterface_ = new NetworkInterface(this); kbethread = new KBEThread(this); t_ = new Thread(new ThreadStart(kbethread.run)); t_.Start(); // 注册事件 installEvents(); }
// Use this for initialization void Start () { MonoBehaviour.print("clientapp::start()"); gameapp = new KBEngineApp(); KBEngineApp.url = "http://127.0.0.1"; KBEngineApp.app.clientType = 3; KBEngineApp.app.ip = "127.0.0.1"; KBEngineApp.app.port = 20013; gameapp.autoImportMessagesFromServer(true); }
public KBEngineApp() { app = this; loginappIP = ip; loginappPort = port; networkInterface_ = new NetworkInterface(this); kbethread_ = new KBEThread(this); t_ = new Thread(new ThreadStart(kbethread_.run)); t_.Start(); }
public KBEngineApp(ClientApp c) { client = c; app = this; networkInterface_ = new NetworkInterface(this); kbethread = new KBEThread(this); t_ = new Thread(new ThreadStart(kbethread.run)); t_.Start(); //networkPeer = new NetworkPeer (); // 注册事件 }
public NetworkInterface(KBEngineApp app) { msgReader.mainLoop = KBEngine.KBEngineApp.app; }
public KBEThread(KBEngineApp app) { this.app_ = app; }
public virtual void destroy() { Dbg.WARNING_MSG("KBEngine::destroy()"); reset(); KBEngine.Event.deregisterIn(this); resetMessages(); KBEngineApp.app = null; }
public KBEngineApp(KBEngineArgs args) { if (app != null) throw new Exception("Only one instance of KBEngineApp!"); app = this; initialize(args); }
public NetworkInterface(KBEngineApp app) { this.app_ = app; packets_ = new List <MemoryStream>(); msgReader.mainLoop = KBEngine.KBEngineApp.app; }
public NetworkInterface(KBEngineApp app) { this.app_ = app; bindMessage(); packets_ = new List<MemoryStream>(); }