Fix storyboard flipping potentially not having an effect (#7260)

Fix storyboard flipping potentially not having an effect
This commit is contained in:
Dean Herbert 2019-12-18 17:48:41 +09:00 committed by GitHub
commit 69f888fc49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 58 additions and 4 deletions

View File

@ -17,8 +17,35 @@ public class DrawableStoryboardAnimation : TextureAnimation, IFlippable, IVector
{
public StoryboardAnimation Animation { get; private set; }
public bool FlipH { get; set; }
public bool FlipV { get; set; }
private bool flipH;
public bool FlipH
{
get => flipH;
set
{
if (flipH == value)
return;
flipH = value;
Invalidate(Invalidation.MiscGeometry);
}
}
private bool flipV;
public bool FlipV
{
get => flipV;
set
{
if (flipV == value)
return;
flipV = value;
Invalidate(Invalidation.MiscGeometry);
}
}
private Vector2 vectorScale = Vector2.One;

View File

@ -17,8 +17,35 @@ public class DrawableStoryboardSprite : Sprite, IFlippable, IVectorScalable
{
public StoryboardSprite Sprite { get; private set; }
public bool FlipH { get; set; }
public bool FlipV { get; set; }
private bool flipH;
public bool FlipH
{
get => flipH;
set
{
if (flipH == value)
return;
flipH = value;
Invalidate(Invalidation.MiscGeometry);
}
}
private bool flipV;
public bool FlipV
{
get => flipV;
set
{
if (flipV == value)
return;
flipV = value;
Invalidate(Invalidation.MiscGeometry);
}
}
private Vector2 vectorScale = Vector2.One;