Skip to content

Instantly share code, notes, and snippets.

@kg
Created May 2, 2011 22:52
Show Gist options
  • Save kg/952527 to your computer and use it in GitHub Desktop.
Save kg/952527 to your computer and use it in GitHub Desktop.
public interface IInteractable {
bool CanInteract (IHasBounds interactor);
void BeginInteract (IHasBounds interactor);
void EndInteract (IHasBounds interactor);
string GetInteractLegend ();
}
public interface IUpdateable {
bool AllowWake { get; }
bool AllowSleep { get; }
void Update ();
}
public interface ICollidable : IHasAnchor {
DrawablePolygon[] GetCollisionList ();
bool ShouldObstruct (ICollidable obj);
}
public interface IStandable {
float? ComputeStandingY (float x1, float x2, float y);
}
public interface IHasHealth {
float Health { get; }
bool Injure (IHasAnchor source, float damage);
}
public interface IRider : ICollidable {
void BeginRiding (IRideable riding);
void StopRiding (IRideable riding);
}
public interface IRideable : ICollidable {
bool TryBeginRiding (IRider rider);
bool TryStopRiding (IRider rider);
}
public interface IClingable {
bool Clingable {
get;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment