public override void RespondToCollision(CollisionData collisionData)
{
for (int i = 0; i < collisionData.hitObjectsCollisionGroupStrings.Count; i++)
{
if (collisionData.hitObjectsCollisionGroupStrings[i] == "unpassableBlock" ||
collisionData.hitObjectsCollisionGroupStrings[i] == "racket" ||
collisionData.hitObjectsCollisionGroupStrings[i] == "indestructibleBlock")
{
if (collisionData.CollisionForceDirection.Row * this.Speed.Row < 0)
{
this.Speed.Row *= -1;
}
if (collisionData.CollisionForceDirection.Col * this.Speed.Col < 0)
{
this.Speed.Col *= -1;
}
}
}
}