private void BeginNewSprite() { CurrentFrame = 0; CurrentFrameTime = 0; if (Sprites.Count == 0) { SpriteVBO.CreateNewBuffer(0, 0); return; } OnSpriteCreation?.Invoke(Sprites[0].Name); switch (Sprites[0].SpriteType) { case SpriteType.Moving: SpriteVBO.CreateNewBuffer(1, 1); break; case SpriteType.Static: SpriteVBO.CreateNewBuffer(Sprites[0].Positions.Length, 1); break; } SetupNewFrame(); }