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

@ -26,11 +26,13 @@ namespace Strawberry
public float Value
{
[Inline]
get
{
return value;
}
[Inline]
set
{
this.value = Math.Max(0, value);
@ -38,6 +40,13 @@ namespace Strawberry
}
}
[Inline]
public void Clear()
{
value = 0;
Active = false;
}
public override void Update()
{
if (value > 0)
@ -54,5 +63,10 @@ namespace Strawberry
}
}
}
static public implicit operator bool(Timer timer)
{
return timer.value > 0;
}
}
}