19 lines
261 B
C#
19 lines
261 B
C#
namespace Sasalka;
|
|
|
|
public static class UseSystem
|
|
{
|
|
public static bool TryUse( IUseContext context )
|
|
{
|
|
foreach ( var useable in context.GetUsables() )
|
|
{
|
|
if ( useable.CanUse() )
|
|
{
|
|
useable.Use();
|
|
return true;
|
|
}
|
|
}
|
|
|
|
return false;
|
|
}
|
|
}
|