//Обрабатывает последствия столкновения 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)); }
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)); }
public override void CollisionWith(DrawableObject b) { base.CollisionWith(b); if (b.GetType().Name == "Wall") { position = previousPosition; } }
public override void CollisionWith(DrawableObject b) { base.CollisionWith(b); if (b.GetType().Name=="Wall") { position = previousPosition; } }
public override void CollisionWith(DrawableObject b) { //base.CollisionWith(b); //if (b.GetType().Name == "Hero") //{ this.brush = System.Drawing.Brushes.Red; //} }
public override void CollisionWith(DrawableObject b) { //base.CollisionWith(b); if (b.GetType().Name == "Bullet") { this.delete = true; //this.bulletBrush = System.Drawing.Brushes.Red; } }