// Use this for initialization
    void Awake()
    {
        setup       = true;
        _floorsList = AsciiParser.AsciiParserMethod(_asciiFloors);
        _typesList  = AsciiParser.AsciiParserMethod(_asciiTypes);
        _masksList  = AsciiParser.AsciiParserMethod(_asciiMasks);

        GameObject scannersParent = GameObject.Find("ScannersParent");

        if (scannersParent != null)
        {
            EventManager.StartListening("scannersInitialized", FindInteractiveZone);
        }
        else
        {
            FindInteractiveZone();
        }
    }
コード例 #2
0
ファイル: DxfFile.cs プロジェクト: zixuan203344/Dxflib
        /// <summary>
        ///     Constructor that requires a path to a file.
        ///     This constructor will read the file and set up all of the required
        ///     tools for the DxfFile class
        /// </summary>
        /// <param name="pathToFile">An absolute or relative path to a dxf file</param>
        public DxfFile(string pathToFile)
        {
            // Initialize
            var fileReader = new DxfReader(pathToFile);

            Layers = new LayerDictionary();

            // Setup file
            PathToFile  = fileReader.PathToFile;
            FileName    = Path.GetFileName(PathToFile);
            DxfFileData = new TaggedDataList(fileReader.ReadFile());

            // The Main Parsing Calling Function
            var asciiParser = new AsciiParser(this);

            asciiParser.ParseFile();

            // Update the layer dictionary now that the Entities are all built
            Layers.UpdateDictionary(Entities.Values);
        }