Example #1
0
 //Обрабатывает последствия столкновения
 public virtual void CollisionWith(DrawableObject b)
 {
     //!(this.position.Y < (b.position.Y + b.height) ||
         //    (this.position.Y + this.height) > b.position.Y ||
         //    (this.position.X + this.width) < b.position.X ||
         //    this.position.X > (b.position.X + b.width));
 }
Example #2
0
 virtual public void CollisionWith(DrawableObject b) //Обрабатывает последствия столкновения
 {
     //!(this.position.Y < (b.position.Y + b.height) ||
     //    (this.position.Y + this.height) > b.position.Y ||
     //    (this.position.X + this.width) < b.position.X ||
     //    this.position.X > (b.position.X + b.width));
 }
Example #3
0
 public override void CollisionWith(DrawableObject b)
 {
     base.CollisionWith(b);
     if (b.GetType().Name == "Wall")
     {
         position = previousPosition;
     }
 }
Example #4
0
 public override void CollisionWith(DrawableObject b)
 {
     base.CollisionWith(b);
     if (b.GetType().Name=="Wall")
     {
         position = previousPosition;
     }
 }
Example #5
0
 public override void CollisionWith(DrawableObject b)
 {
     //base.CollisionWith(b);
     //if (b.GetType().Name == "Hero")
     //{
     this.brush = System.Drawing.Brushes.Red;
     //}
 }
Example #6
0
 public override void CollisionWith(DrawableObject b)
 {
     //base.CollisionWith(b);
     if (b.GetType().Name == "Bullet")
     {
         this.delete = true;
         //this.bulletBrush = System.Drawing.Brushes.Red;
     }
 }