Add ParticleSystem, fix incorrect Argb conversion in Color, remove byte casting in LerpColor, update TestGame to demostrate particle system.
This commit is contained in:
@@ -37,21 +37,18 @@ namespace Voile
|
||||
public float R { get; set; }
|
||||
public float G { get; set; }
|
||||
public float B { get; set; }
|
||||
public float A { get; set; }
|
||||
public float A { get; set; } = 1.0f;
|
||||
|
||||
public int Argb
|
||||
{
|
||||
get
|
||||
{
|
||||
int c = (ushort)Math.Round(A * 255f);
|
||||
c <<= 8;
|
||||
c |= (ushort)Math.Round(R * 255f);
|
||||
c <<= 8;
|
||||
c |= (ushort)Math.Round(G * 255f);
|
||||
c <<= 8;
|
||||
c |= (ushort)Math.Round(B * 255f);
|
||||
int a = (int)Math.Round(A * 255f) << 24;
|
||||
int r = (int)Math.Round(R * 255f) << 16;
|
||||
int g = (int)Math.Round(G * 255f) << 8;
|
||||
int b = (int)Math.Round(B * 255f);
|
||||
|
||||
return c;
|
||||
return a | r | g | b;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user