Пример #1
0
        internal EditableIfScript(EditorController controller, IIfScript script, UndoLogger undoLogger)
            : base(controller, script, undoLogger)
        {
            m_ifScript = script;

            m_ifScript.IfScriptUpdated += m_ifScript_IfScriptUpdated;

            if (m_ifScript.ThenScript == null)
            {
                m_ifScript.ThenScript = new MultiScript(Controller.WorldModel);
            }

            m_thenScript          = EditableScripts.GetInstance(Controller, m_ifScript.ThenScript);
            m_thenScript.Updated += nestedScript_Updated;

            foreach (var elseIfScript in m_ifScript.ElseIfScripts)
            {
                EditableElseIf newEditableElseIf = new EditableElseIf(elseIfScript, this);
                m_elseIfScripts.Add(elseIfScript.Script, newEditableElseIf);
                newEditableElseIf.EditableScripts.Updated += nestedScript_Updated;
            }

            if (m_ifScript.ElseScript != null)
            {
                m_elseScript          = EditableScripts.GetInstance(Controller, m_ifScript.ElseScript);
                m_elseScript.Updated += nestedScript_Updated;
            }
        }
Пример #2
0
        public EditableScriptBase(EditorController controller, IScript script, UndoLogger undoLogger)
        {
            Script       = script;
            m_controller = controller;
            if (script != null)
            {
                ((IMutableField)script).UndoLog = undoLogger;
            }

            s_count++;
            m_id = "script" + s_count;
        }
Пример #3
0
        public EditableScriptBase(EditorController controller, IScript script, UndoLogger undoLogger)
        {
            Script = script;
            m_controller = controller;
            if (script != null)
            {
                ((IMutableField)script).UndoLog = undoLogger;
            }

            s_count++;
            m_id = "script" + s_count;
        }
Пример #4
0
        public WorldModel(string filename, string originalFilename)
        {
            m_expressionOwner = new Functions.ExpressionOwner(this);
            m_template = new Template(this);
            InitialiseElementFactories();
            m_objectFactory = (ObjectFactory)m_elementFactories[ElementType.Object];

            InitialiseDebuggerObjectTypes();
            m_filename = filename;
            m_originalFilename = originalFilename;
            m_elements = new Elements();
            m_undoLogger = new UndoLogger(this);
            m_game = ObjectFactory.CreateObject("game", ObjectType.Game);
        }
Пример #5
0
 internal EditableScript(EditorController controller, IScript script, UndoLogger undoLogger)
     : base(controller, script, undoLogger)
 {
     m_editorName = Script.Keyword;
 }
Пример #6
0
        internal EditableIfScript(EditorController controller, IIfScript script, UndoLogger undoLogger)
            : base(controller, script, undoLogger)
        {
            m_ifScript = script;

            m_ifScript.IfScriptUpdated += m_ifScript_IfScriptUpdated;

            if (m_ifScript.ThenScript == null)
            {
                m_ifScript.ThenScript = new MultiScript(Controller.WorldModel);
            }

            m_thenScript = EditableScripts.GetInstance(Controller, m_ifScript.ThenScript);
            m_thenScript.Updated += nestedScript_Updated;

            foreach (var elseIfScript in m_ifScript.ElseIfScripts)
            {
                EditableElseIf newEditableElseIf = new EditableElseIf(elseIfScript, this);
                m_elseIfScripts.Add(elseIfScript.Script, newEditableElseIf);
                newEditableElseIf.EditableScripts.Updated += nestedScript_Updated;
            }

            if (m_ifScript.ElseScript != null)
            {
                m_elseScript = EditableScripts.GetInstance(Controller, m_ifScript.ElseScript);
                m_elseScript.Updated += nestedScript_Updated;
            }
        }
Пример #7
0
 internal EditableScript(EditorController controller, IScript script, UndoLogger undoLogger)
     : base(controller, script, undoLogger)
 {
     m_editorName = Script.Keyword;
 }