好了,所以我畫磚在我的地圖通過下面的代碼:碰撞檢測瓷磚
for (int x = 0; x < WindowsWidth + TextureWidth; x += TextureWidth)
{
for (int y = 400; y < WindowsHeight; y += TextureHeight)
{
spriteBatch.Draw(Texture, new Rectangle((int)x, (int)y, TextureWidth, TextureHeight), Color.White);
}
}
我希望這個代碼是好,如果沒有,我想聽聽你的意見吧,請。
好的,所以我不知道如何使用這些瓷磚和我的播放器進行矩形碰撞檢測。
評論如果您需要任何其他解釋,謝謝。
你嘗試過什麼?從http://create.msdn.com/en-US/到各種書籍,有很多很棒的資源http://oreilly.com/catalog/0636920013709 – Spacemancraig