Ejemplo n.º 1
0
    //---------------------------------------------------------------------
    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);
        }
    }
Ejemplo n.º 2
0
    //---------------------------------------------------------------------
    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);
        }
    }
Ejemplo n.º 3
0
    //---------------------------------------------------------------------
    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);
        //}
    }
Ejemplo n.º 4
0
    //---------------------------------------------------------------------
    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);
        }
    }