Example #1
0
 public Line(Vector2 _startPoint, bool _horizontal, ProceduralMap _mapa, float _nodeSize)
 {
     this.startPoint = _startPoint;
     this.horizontal = _horizontal;
     this.map        = _mapa;
     this.nodeSize   = _nodeSize;
 }
Example #2
0
    public override void OnInspectorGUI()
    {
        ProceduralMap mapGen = (ProceduralMap)target;

        if (DrawDefaultInspector())
        {
            if (mapGen.autoUpdate)
            {
                mapGen.GenerateMap();
            }
        }

        if (GUILayout.Button("Generate"))
        {
            mapGen.GenerateMap();
        }
    }
Example #3
0
    public override void OnInspectorGUI()
    {
        ProceduralMap map = (ProceduralMap)target;

        if (DrawDefaultInspector())
        {
            if (map.autoUpdate)
            {
                map.EditorStart();
            }
        }

        if (GUILayout.Button("Generate Editor Preview"))
        {
            map.EditorStart();
        }
    }
Example #4
0
    // Use this for initialization
    void Start()
    {
        //Generate map:
        var hilbert = HilbertCurve.GenerateHilbert(7);
        // HilbertCurve.Print(hilbert);
        var path = HilbertCurve.GetPath(hilbert, 10, Random.Range(8, 15), Random.Range(15, 23));
        var map  = ProceduralMap.GenerateMap(path, 3);

        //randomize boss order:
        Utils.Shuffle(stage.emitters);

        //place player and bosses:
        SetupPositions(map);

        //fill stageManagers list
        StageManager manager = new StageManager();

        manager.LoadEmitters(stage);
        stageManager = manager;
    }