public virtual void outOfBounds()
{
if (x < 0)
{
this.speedX = this.speedX * (float)(-0.1);
this.x = 0;
}
else if (x > MatchConfig.mapWidth)
{
this.speedX = this.speedX * (float)(-0.1);
this.x = MatchConfig.mapWidth;
}
if (y < 0)
{
this.speedY = this.speedY * (float)(-0.1);
this.y = 0;
}
else if (y > MatchConfig.mapHeight)
{
this.speedY = this.speedY * (float)(-0.1);
this.y = MatchConfig.mapHeight;
}
}