using System;
namespace Chernobyl.Mathematics.Mechanics
{
///
/// A mechanism that is either up (off) or down (on).
///
public interface IButton
{
///
/// True if the button was down, false if otherwise (set to the previous
/// value of IButton.IsDown).
///
bool WasDown { get; }
///
/// True if the button is down, false if otherwise.
///
bool IsDown { get; }
///
/// An event that is raised when this button is pushed down or turned
/// on.
///
event EventHandler OnDown;
///
/// An event that is raised when this button has stopped being pushed
/// down or is off.
///
event EventHandler OnUp;
///
/// An event that is raised when the button's state has changed, i.e.
/// the button has gone from up to down or down to up.
///
event EventHandler OnChange;
}
}