Exemplo n.º 1
0
        public ToyWorld(Map tmxDeserializedMap, StreamReader tileTable)
        {
            if (tileTable == null)
                throw new ArgumentNullException("tileTable");
            if (tmxDeserializedMap == null)
                throw new ArgumentNullException("tmxDeserializedMap");
            Contract.EndContractBlock();

            Size = new Vector2I(tmxDeserializedMap.Width, tmxDeserializedMap.Height);
            AutoupdateRegister = new AutoupdateRegister(100000);
            TilesetTable = new TilesetTable(tmxDeserializedMap, tileTable);

            InitAtlas(tmxDeserializedMap);
            InitPhysics();
            TileDetectorRegister = new TileDetectorRegister(Atlas, TilesetTable);
            RegisterSignals();
        }