Exemplo n.º 1
0
        /// <summary>
        /// Initializes SDL library.
        /// </summary>
        /// <exception cref="SystemException"></exception>
        /// <param name="negumDirPath">Path to Negum directory.</param>
        public virtual void Initialize(string negumDirPath)
        {
            if (SDL_Init(SDL_INIT_EVERYTHING) < 0)
            {
                throw new SystemException($"Error when initializing SDL: \"{SDL_GetError()}\"");
            }

            this.Client = NegumClientFactory.CreateAsync(negumDirPath).Result;
        }
Exemplo n.º 2
0
        public async Task Should_Create_New_Negum_Client_Object(string negumDirPath)
        {
            NegumContainer.RegisterKnownTypes();
            NegumGameContainer.RegisterKnownTypes();

            var client = await NegumClientFactory.CreateAsync(negumDirPath);

            Assert.NotNull(client);
        }