public void Load(byte[] _bytes) { if (this.LevelProperties != null) { MekaItem file = MekaItem.FromBytesEncrypted(_bytes); this.Properties = PropertySaver.Load(PropertyReflector.GetPropertyTypes(this.LevelProperties), file["Properties"].Children /*file.Contains("Info") ? file["Info"].Children : new List<MekaItem>()*/); } }
public LevelPropertiesEditor(LevelEditor _editor, Type _levelproperties) { this.Editor = _editor; this.LevelProperties = _levelproperties; if (_levelproperties != null) { this.Properties = PropertyReflector.GetPropertyValues(_levelproperties.GetConstructor(new Type[0]).Invoke(new object[0])); } }
public object GetValue() { if (this._InputControl is PropertyEditor) { return(PropertyReflector.GenerateFromProperties(this._Type, ((PropertyEditor)this._InputControl).GetProperties())); } else { return(this._InputControl.GetValue()); } }
public void Apply(Entity _entity) => PropertyReflector.ApplyProperties(_entity, PropertySaver.Load(PropertyReflector.GetPropertyTypes <SavableAttribute>(_entity.GetType()), this.Properties));