public void HandleHits(Collider c, IEnumerable<ObjectAndDistance> gobs) { foreach(var gob in gobs) { Vehicle v = (Vehicle)gob.Object; v.Damage(_damage); _game.RemoveObject(this); } }
public void HandleHit(Collider c, IEnumerable<ObjectAndDistance> gobs) { Vehicle v = (Vehicle)gobs.Single().Object; if(v != null) v.Damage(_damage); }
public void AddCollider(Collider col) { lock (_colliders) { _colliders.Add (col); } }