public Coroutine(AnimatedCursor parent, ICursor cursor) { Parent = parent; Cursor = cursor; Current = null; TextureIndex = 0; SecondsToWait = 1f / parent.config.Speed; }
public void Write(IContent writable, AnimatedCursor animatedCursor) { if (writable == null) { throw new ArgumentNullException(nameof(writable)); } if (animatedCursor == null) { throw new ArgumentNullException(nameof(animatedCursor)); } WriteConfig(writable, animatedCursor.Config); WriteTextures(writable, animatedCursor.Textures); }
public void Test() { var factroy = new AnimatedCursorFactroy(); var memoryContent = new MemoryContent(); var defaultCursor = new AnimatedCursor(defaultConfig, defaultTextures); using (memoryContent.BeginUpdateAuto()) { factroy.Write(memoryContent, defaultCursor); } var cursor2 = factroy.Read(memoryContent); Assert.AreEqual(defaultConfig, cursor2.Config); AreEqual(defaultTextures, cursor2.Textures); }