private void Awake()
    {
        if (instance != null)
        {
            Debug.Log("More than one GenerationSystem in scene");
            return;
        }
        instance = this;

        //ledgeHeight = new float[numberOfTests];
    }
Beispiel #2
0
        static void GenerateLevel()
        {
            string file = "input/grammar.lsp";

            system = new GenerationSystem();
            system.OpenFromFile(file);

            // start building the world using the generated expression
            Build(Generate());
            //Generate();
            //system.SaveToFile("out.txt");
        }
    private Symbol container = null; // the container of the current tile

    void Start()
    {
        // load up the ludoscope project
        string file     = "TopdownTutorial/TopdownTutorial.lsp";
        string fullPath = System.IO.Path.Combine(Application.streamingAssetsPath, file);

        // ready the system with the ludoscope project
        system = new GenerationSystem();
        system.OpenFromFile(fullPath);

        Debug.Log("System " + file + " loaded");

        // start building the world using the generated expression
        Build(Generate());
    }
Beispiel #4
0
    public void InitLudoLevelGen()
    {
        levelParent = new GameObject("levelParentObject");

        // load ludoscope project
        file     = "LudoScope_Grammars/DungeonGenerator.lsp";
        fullPath = System.IO.Path.Combine(Application.streamingAssetsPath, file);

        //ready the system with ludoscope project
        system = new GenerationSystem();
        system.OpenFromFile(fullPath);

        Debug.Log("System " + file + " loaded");

        Build(Generate());
    }