Demo fix
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using Godot;
|
||||
using Skeleton.DataStructure.Link;
|
||||
using VirtualChemistry.Chemistry.Mixtures.Implements;
|
||||
@@ -28,6 +29,16 @@ public partial class FlaskContent : ColorRect
|
||||
public void UpdateVolumeAndPosition()
|
||||
{
|
||||
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");
|
||||
a.TrackSetKeyValue(0, 0, Size);
|
||||
a.TrackSetKeyValue(0, 1, new Vector2(Size.X, (float)height));
|
||||
@@ -36,7 +47,8 @@ public partial class FlaskContent : ColorRect
|
||||
a = AP.GetAnimation("PositionChange");
|
||||
a.TrackSetKeyValue(0,0,Position);
|
||||
a.TrackSetKeyValue(0,1, new Vector2(Position.X, -(float)StartFrom));
|
||||
AP.Play();
|
||||
Color = Color.Color8(Mixture.ColorRed, Mixture.ColorGreen, Mixture.ColorGreen, Mixture.ColorTransparent);
|
||||
AP.Play();*/
|
||||
}
|
||||
|
||||
// Called when the node enters the scene tree for the first time.
|
||||
|
||||
Reference in New Issue
Block a user