Пример #1
0
    void Awake()
    {
        mGUIManager = gameObject.GetComponent<GUIManager>();

        tileActive = null;

        if (idFile && tileMapFile)
        {
            mTileMap = new TileMap(idFile, tileMapFile, "Prefabs/Tiles/");
            mTileMap.Start();
            mLoadSuccess = mTileMap.GetLoadSuccess();

            if (pathOneFile && mLoadSuccess)
            {
                mPath = new TilePath(pathOneFile, mTileMap.GetRows(), mTileMap.GetColumns());
                mPath.Start();
                mLoadSuccess = mPath.GetLoadSuccess();
            }
            if (pathTwoFile && mLoadSuccess)
            {
                mPathTwo = new TilePath(pathTwoFile, mTileMap.GetRows(), mTileMap.GetColumns());
                mPathTwo.Start();
                mLoadSuccess = mPathTwo.GetLoadSuccess();
            }
        }
        else
            mLoadSuccess = false;

        mTileWidth = mTileMap.GetTileSize();
        mTileHeight = mTileMap.GetTileHeight();
    }