//--------------------------------------------------------------------- public EcEngine(ref EcEngineSettings settings, IEcEngineListener listener) { mInstance = this; mListener = listener; Settings = settings; mEntityMgr = new EntityMgr(1, "Client"); mEntityMgr.regComponent <ClientAutoPatcher <DefAutoPatcher> >(); mEntityMgr.regComponent <ClientNode <DefNode> >(); mEntityMgr.regComponent <ClientSuperSocket <DefSuperSocket> >(); mEntityMgr.regEntityDef <EtAutoPatcher>(); mEntityMgr.regEntityDef <EtNode>(); mEntityMgr.regEntityDef <EtSuperSocket>(); EtNode = mEntityMgr.createEntity <EtNode>(null, null); var co_node = EtNode.getComponent <ClientNode <DefNode> >(); CoSuperSocket = co_node.CoSuperSocket; // 通知业务层初始化 if (mListener != null) { mListener.init(mEntityMgr, EtNode); } }
//--------------------------------------------------------------------- public EcEngine(ref EcEngineSettings settings, IEcEngineListener listener) { mInstance = this; mListener = listener; Settings = settings; mEntityMgr = new EntityMgr(1, "Client"); mEntityMgr.regComponent<ClientAutoPatcher<DefAutoPatcher>>(); mEntityMgr.regComponent<ClientNode<DefNode>>(); mEntityMgr.regComponent<ClientSuperSocket<DefSuperSocket>>(); mEntityMgr.regEntityDef<EtAutoPatcher>(); mEntityMgr.regEntityDef<EtNode>(); mEntityMgr.regEntityDef<EtSuperSocket>(); EtNode = mEntityMgr.createEntity<EtNode>(null, null); var co_node = EtNode.getComponent<ClientNode<DefNode>>(); CoSuperSocket = co_node.CoSuperSocket; // 通知业务层初始化 if (mListener != null) { mListener.init(mEntityMgr, EtNode); } }
//--------------------------------------------------------------------- public EcEngine(ref EcEngineSettings settings, IEcEngineListener listener) { mInstance = this; mListener = listener; Settings = settings; mEntityMgr = new EntityMgr(1, "Client"); mEntityMgr.setRpcSessionFactory(new RpcSessionFactoryTcpClient()); //mEntityMgr.regComponent<ClientAutoPatcher<DefAutoPatcher>>(); //mEntityMgr.regComponent<ClientNode<DefNode>>(); //mEntityMgr.regEntityDef<EtAutoPatcher>(); //mEntityMgr.regEntityDef<EtNode>(); //EtNode = mEntityMgr.createEntity<EtNode>(null, null); //var co_node = EtNode.getComponent<ClientNode<DefNode>>(); //// 通知业务层初始化 //if (mListener != null) //{ // mListener.init(mEntityMgr, EtNode); //} }
//--------------------------------------------------------------------- public EcEngine(ref EcEngineSettings settings, IEcEngineListener listener) { mInstance = this; mListener = listener; Settings = settings; mEntityMgr = new EntityMgr(1, "Client"); mEntityMgr.setRpcSessionFactory(new RpcSessionFactoryTcpClient()); mEntityMgr.regComponent<ClientAutoPatcher<DefAutoPatcher>>(); mEntityMgr.regComponent<ClientNode<DefNode>>(); mEntityMgr.regEntityDef<EtAutoPatcher>(); mEntityMgr.regEntityDef<EtNode>(); EtNode = mEntityMgr.createEntity<EtNode>(null, null); var co_node = EtNode.getComponent<ClientNode<DefNode>>(); // 通知业务层初始化 if (mListener != null) { mListener.init(mEntityMgr, EtNode); } }