衝突に少し問題があります。実際に衝突させる方法を最終的に理解した後、パックマンを設定された位置にリセットすることしかできず、彼を本来の位置にとどまらせる方法がわかりません。
player.update();
for (int y = 0; y < NrOfTilesY; y++)
{
for (int x = 0; x < NrOfTilesX; x++)
{
if (tileArray[x, y] is Nest)
{
Rectangle rectW = tileArray[x, y].Bounds();
Rectangle rectP = Player.pacmanBounds;
if(rectW.Intersects(rectP))
{
Player.pacmanBounds.X = 32;
Player.pacmanBounds.Y = 32;
}
}
}
}