Tag: collision detection

平铺图碰撞检测

我一直在查看其他问题,但似乎无法解决这个问题。我在自定义tilemap加载器中使用XNA。 这是代码。 http://pastebin.com/cuatQHTb using System; using System.Collections.Generic; using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.GamerServices; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Media; using Microsoft.Xna.Framework.Net; using Microsoft.Xna.Framework.Storage; namespace Pressure { public class Game1 : Microsoft.Xna.Framework.Game { GraphicsDeviceManager graphics; SpriteBatch spriteBatch; Texture2D player; Vector2 pos = Vector2.Zero; Vector2 playersp = new Vector2(50.0f, 50.0f); Texture2D road1; Texture2D […]