public void treatCollision(Planets object2) { if (object2 is Planets) { this.speedX = this.speedX * (float)(-0.25); this.speedY = this.speedY * (float)(-0.25); } }