Bug Fix
This commit is contained in:
@@ -8,7 +8,7 @@ public partial class FlaskContent : ColorRect
|
||||
|
||||
public HomogeneousMixture Mixture { get; set; } = HomogeneousMixture.Null;
|
||||
private const double ContainerHeight = 512d;
|
||||
public double ContainerVolume => Mixture.HeterogeneousMixture.Container.Volume();
|
||||
private double ContainerVolume => Mixture.HeterogeneousMixture.Container.Volume();
|
||||
public double Volume => Mixture.Volume;
|
||||
private TextureButton Mask { get; set; }
|
||||
|
||||
@@ -31,22 +31,21 @@ public partial class FlaskContent : ColorRect
|
||||
double height = (Volume / ContainerVolume) * ContainerHeight;
|
||||
Position = new Vector2(Position.X, 512-(float)(StartFrom + height));
|
||||
Size = new Vector2(Size.X, (float)height);
|
||||
//Mask.Size = Size;
|
||||
Color = Color.Color8(
|
||||
Mixture.ColorRed,
|
||||
Mixture.ColorGreen,
|
||||
Mixture.ColorGreen,
|
||||
Mixture.ColorTransparent
|
||||
);
|
||||
/*
|
||||
Animation a = AP.GetAnimation("HeightChange");
|
||||
|
||||
/*Animation a = AP.GetAnimation("HeightChange");
|
||||
a.TrackSetKeyValue(0, 0, Size);
|
||||
a.TrackSetKeyValue(0, 1, new Vector2(Size.X, (float)height));
|
||||
AP.Play("HeightChange");
|
||||
AP.Play("PositionChange");
|
||||
a = AP.GetAnimation("PositionChange");
|
||||
a.TrackSetKeyValue(0,0,Position);
|
||||
a.TrackSetKeyValue(0,1, new Vector2(Position.X, -(float)StartFrom));
|
||||
a.TrackSetKeyValue(0,1, new Vector2(Position.X, 512-(float)(StartFrom + height)));
|
||||
Color = Color.Color8(Mixture.ColorRed, Mixture.ColorGreen, Mixture.ColorGreen, Mixture.ColorTransparent);
|
||||
AP.Play();*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user