The following event can possibly get called hundreds of times a frame.
public bool OnCollision(Body body1, Body body2)
{
if(body2.Tag is Dog)
((Dog)bo
Would an approach like this be feasible or useful?
public interface ICollidable
{
void OnCollision();
}
public abstract class Body : ICollidable
{
public abstract void OnCollision();
}
public class Dog : Body
{
public override void OnCollision();
{
Bark();
}
}
public Boolean OnCollision(ICollidable a, ICollidable b)
{
b.OnCollision();
}