Example #1
0
        public void HandleHits(Collider c, IEnumerable<ObjectAndDistance> gobs)
        {
            foreach(var gob in gobs)
            {
                Vehicle v = (Vehicle)gob.Object;
                v.Damage(_damage);

                _game.RemoveObject(this);
            }
        }
Example #2
0
 public void HandleHit(Collider c, IEnumerable<ObjectAndDistance> gobs)
 {
     Vehicle v = (Vehicle)gobs.Single().Object;
     if(v != null)
         v.Damage(_damage);
 }
Example #3
0
 public void AddCollider(Collider col)
 {
     lock (_colliders) {
         _colliders.Add (col);
     }
 }