Sample game. Easing methods. Colors.

This commit is contained in:
Matt Thorson
2020-05-08 21:05:29 -07:00
parent 786b692a3f
commit 12ea2e43bc
18 changed files with 545 additions and 20 deletions

View File

@ -13,6 +13,9 @@ namespace Strawberry
static public readonly Color Cyan = 0xFF00FFFF;
static public readonly Color Magenta = 0xFFFF00FF;
static public readonly Color Yellow = 0x00FFFFFF;
static public readonly Color DarkGray = 0x3F3F3FFF;
static public readonly Color Gray = 0x7F7F7FFF;
static public readonly Color LightGray = 0xBFBFBFFF;
public uint8 R;
public uint8 G;

View File

@ -51,6 +51,16 @@ namespace Strawberry
return Point((int)Math.Round(X), (int)Math.Round(Y));
}
static public Vector Lerp(Vector a, Vector b, float t)
{
if (t == 0)
return a;
else if (t == 1)
return b;
else
return a + (b - a) * t;
}
public override void ToString(String strBuffer)
{
strBuffer.Set("Vector [ ");