Example #1
0
    private void LoadMap()
    {
        func   = funcs.GetComponent <Inputbuttons>();
        button = buttons.GetComponent <Choosebutton>();
        input  = inputs.GetComponent <Button_play>();
        loader = GameObject.Find("Map").GetComponent <MapLoader>();
        Map loadedMap = loader.GetMap();

        card             = MapLoader.OneDToTwoDArray(loadedMap.map, loadedMap.mapWidth);
        targets          = MapLoader.OneDToTwoDArray(loadedMap.targets, 2);
        startPos         = loadedMap.startPos;
        currentDirection = loadedMap.direction;
    }