예제 #1
0
    public static void unAssignGrammar()
    {
        if (_selectedGrammar != null)
        {
            Grammar g = _selectedGrammar;
            for (int i = 0; i < g.stagedOutputs.Count; i++)
            {
                for (int j = 0; j < g.stagedOutputs[i].shapes.Count; j++)
                {
                    ShapeObject so = g.stagedOutputs[i].shapes[j];
                    so.SetMaterial(SceneManager.displayManager.currMode);
                }
            }
        }

        ruleCreator.SetGrammar(null);
        ruleNavigator.SetGrammar(null);
    }
예제 #2
0
    public static void assignGrammar(Grammar g)
    {
        _selectedGrammar = g;
        if (ruleCreator != null)
        {
            ruleCreator.SetGrammar(g);
            ruleNavigator.SetGrammar(g);
        }

        for (int i = 0; i < g.stagedOutputs.Count; i++)
        {
            for (int j = 0; j < g.stagedOutputs[i].shapes.Count; j++)
            {
                ShapeObject so = g.stagedOutputs[i].shapes[j];
                if (!so.isGraphics)
                {
                    so.SetMaterial(MaterialManager.GB.RuleEditing);
                }
            }
        }

        //SelectedBuilding = g.sgbuilding;
    }