예제 #1
0
        public CachedObjects(ClientHandler client)
        {
            _client  = client;
            Instance = this;

            NaturalResources = new NaturalResourcesManager(client);
        }
예제 #2
0
        public PythonEngine(ClientHandler client)
        {
            this.client    = client;
            _engine        = Python.CreateEngine();
            _scope         = _engine.CreateScope();
            _cachedObjects = new CachedObjects(client);

            _gameAPI   = new GameAPI(client, _scope);
            _engineAPI = new EngineAPI(client);

            PrepareStaticLocals();

            var outputStream       = new MemoryStream();
            var outputStreamWriter = new TcpStreamWriter(outputStream, client);

            _engine.Runtime.IO.SetOutput(outputStream, outputStreamWriter);
        }