public void Init() { _world = new World(new Vector2(0, Defs.Gravity)); _tiles = new List<MapTile>(); Vector2 spoonSize = new Vector2(26, 64); Vector2 spoonPos = Vector2.Zero; _spoon = new Character(_world, spoonSize, spoonPos); // Edge to Block Start from falling off Vector2 edgeStart = new Vector2(0, 0); Vector2 edgeEnd = new Vector2(0, Defs.ScreenHeight); _edge = BodyFactory.CreateEdge(_world, edgeStart, edgeEnd); }
public void LoadContent(ContentManager cm, GraphicsDevice gd, Map map, Character spoon) { _map = map; _mapDisplayDevice = new XnaDisplayDevice(cm, gd); _map.LoadTileSheets(_mapDisplayDevice); _aspectRatio = gd.Viewport.AspectRatio; _spoon = spoon; _spoon._model = cm.Load<Model>("Models/Spoon"); // Test texture = cm.Load<Texture2D>("Models/SpoonTexture"); _viewport.X -= Defs.ScreenWidth / 2; _gd = gd; }