コード例 #1
0
 public override void HandleCollision(CollisionDirection cd, PhysicsAble entity)
 {
     if (entity is Bullet)
     {
         bulletRef = (Bullet)entity;
         bulletRef.attach(this);
     }
     else if (entity is Level)
     {
         velocity = Vector2.Zero;
     }
     else
     {
         base.HandleCollision(cd, entity);
     }
 }