mirror of
https://github.com/MaddyThorson/StrawberryBF.git
synced 2025-07-06 20:45:26 +08:00
Sample game. Easing methods. Colors.
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user