Esempio n. 1
0
        public void Write(IContent writable, StaticCursor staticCursor)
        {
            if (writable == null)
            {
                throw new NotImplementedException();
            }

            WriteConfig(writable, staticCursor.Config);
            WriteTexture(writable, staticCursor.Texture);
        }
        public void Test()
        {
            var factroy       = new StaticCursorFactroy();
            var memoryContent = new MemoryContent();
            var defaultCursor = new StaticCursor(defaultTexture, defaultConfig);

            using (memoryContent.BeginUpdateAuto())
            {
                factroy.Write(memoryContent, defaultCursor);
            }

            var cursor2 = factroy.Read(memoryContent);

            Assert.AreEqual(defaultConfig, cursor2.Config);
            Assert.AreEqual(defaultTexture.width, cursor2.Texture.width);
            Assert.AreEqual(defaultTexture.height, cursor2.Texture.height);
        }