コード例 #1
0
 public EditableCommandPattern(EditorController controller, EditorCommandPattern pattern, Element parent, string attribute)
 {
     m_pattern = pattern;
     m_controller = controller;
     m_parent = parent;
     m_attribute = attribute;
 }
コード例 #2
0
 public EditableCommandPattern(EditorController controller, EditorCommandPattern pattern, Element parent, string attribute)
 {
     m_pattern    = pattern;
     m_controller = controller;
     m_parent     = parent;
     m_attribute  = attribute;
 }
コード例 #3
0
ファイル: EditorController.cs プロジェクト: hyrmedia/quest
        public IEditableCommandPattern CreateNewEditableCommandPattern(string parent, string attribute, string value, bool useTransaction)
        {
            if (useTransaction)
            {
                WorldModel.UndoLogger.StartTransaction(string.Format("Set '{0}' {1} to {2}", parent, attribute, value));
            }

            Element element = m_worldModel.Elements.Get(parent);
            EditorCommandPattern newPattern = new EditorCommandPattern(value);
            EditableCommandPattern newRef = new EditableCommandPattern(this, newPattern, element, attribute);
            element.Fields.Set(attribute, newPattern);

            if (useTransaction)
            {
                WorldModel.UndoLogger.EndTransaction();
            }

            return newRef;
        }
コード例 #4
0
ファイル: FieldSaver.cs プロジェクト: spacecatprime/dump
            public override void Save(GameXmlWriter writer, Element element, string attribute, object value)
            {
                EditorCommandPattern pattern = (EditorCommandPattern)value;

                base.WriteAttribute(writer, element, attribute, "simplepattern", pattern.Pattern);
            }