Beispiel #1
0
 private bool LoadMap(string name, out IndoorTileMapData loadedData)
 {
     if (FileOps.Load(name, FileType.IndoorTileMap, out loadedData) == 1)
     {
         Debug.Log("succesfully loaded data");
         return(true);
     }
     loadedData = new IndoorTileMapData();
     return(false);
 }
Beispiel #2
0
    private void Start()
    {
        IndoorTileMapData tileMapData = new IndoorTileMapData();

        tileMapData.name         = TEST_MAP_NAME;
        tileMapData.width        = 16;
        tileMapData.height       = 16;
        tileMapData.tileSet      = 0;
        tileMapData.ambientLight = new Vector3(0.2f, 0.2f, 0.2f);
        tileMapData.skyColor     = new Vector3(0f, 0f, 0f);

        tileMapData.tiles = IndoorTileMapData.CreateRandomTiles(tileMapData.width, tileMapData.height);

        GameObject go = new GameObject("tile_map");

        _tileMap = go.AddComponent <IndoorTileMap>();

        _tileMap.Initialize(tileMapData, tilePrefabLib);

        LineDrawTool.EnsureExistance();
    }