private static void Write(AssetStreamWriter writer, UIElement o, List <object> objectDictionary) { writer.Write(o.ClassID); writer.Write(o.ID); writer.WriteBibimString(o.Name); writer.Write(o.Tag); }
private static bool WriteSelector <V>(AssetStreamWriter writer, EvalSelectorTemplate <V> o, IList <object> objMap) { if (WriteEval(writer, o, objMap) == false) { return(false); } Write(writer, o.Condition, objMap); if (o.Cases != null) { writer.Write((short)o.Cases.Count); foreach (var item in o.Cases) { writer.Write(item.Min); writer.Write(item.Max); Write(writer, item.Item, objMap); } } else { writer.Write((short)0); } Write(writer, o.DefaultCase, objMap); return(true); }
public override void Write(AssetStreamWriter writer, BitMask asset) { writer.Write(asset.ClassID); writer.Write((short)asset.Width); writer.Write((short)asset.Height); writer.Write((short)asset.Pitch); writer.Write(asset.Buffer); }
private static void Write(AssetStreamWriter writer, UIImage o, List <object> objectDictionary) { Write(writer, (UIVisual)o, objectDictionary); // EMBEDDED UIIMAGE // writer.Write(o.Source); ImageWriter.WriteBody(writer, o.Source); writer.Write(o.HorizontalFlip); writer.Write(o.VerticalFlip); writer.Write(o.Mask); }
private static void Write(AssetStreamWriter writer, UIButton o, List <object> objectDictionary) { Write(writer, (UIPanel)o, objectDictionary); WriteVisual(writer, o.Normal, objectDictionary); WriteVisual(writer, o.Pushed, objectDictionary); WriteVisual(writer, o.Hovering, objectDictionary); writer.Write(o.HideInactives); writer.Write(o.FocusVisible); writer.Write(o.IsFrozen); }
public override void Write(AssetStreamWriter writer, ParticleSystemSet asset) { writer.Write(asset.ClassID); writer.Write((short)asset.ParticleSystems.Count); foreach (var item in asset.ParticleSystems) { writer.WriteBibimString(item.Key); ParticleSystemWriter.WriteBody(writer, item.Value); } }
public override void Write(AssetStreamWriter writer, SpriteSet asset) { writer.Write(asset.ClassID); writer.Write((short)asset.Sprites.Count); foreach (var item in asset.Sprites) { writer.WriteBibimString(item.Key); SpriteWriter.WriteBody(writer, item.Value); } }
private static void Write(AssetStreamWriter writer, UIEditText o, List <object> objectDictionary) { Write(writer, (UILabel)o, objectDictionary); writer.Write((byte)o.Format); writer.WriteBibimString(o.Placeholder); writer.Write(o.MaxLength); writer.Write(o.Frozen); writer.WriteBibimString(o.EditorTitle); writer.WriteBibimString(o.EditorDescription); }
private static void Write(AssetStreamWriter writer, OscillationCurve o, IList <object> objMap) { if (WriteEasingCurve(writer, o, objMap) == false) { return; } writer.Write((byte)o.Mode); writer.Write((short)o.Frequency); writer.Write(o.Strength); }
public override void Write(AssetStreamWriter writer, ShaderEffect asset) { writer.Write(asset.ClassID); writer.Write(asset.GraphicsDevice); var tag = (ShaderEffectCookingTag)asset.Tag; writer.Write(tag.Extra); writer.Write(tag.Code.Length); writer.Write(tag.Code); }
private static bool WriteSequenceBase <V>(AssetStreamWriter writer, EvalSequenceBaseTemplate <V> o, IList <object> objMap) { if (WriteEval(writer, o, objMap) == false) { return(false); } writer.Write(o.Velocity); writer.Write(o.Looped); return(true); }
private static bool WriteRangedSequence <V, VSequence>(AssetStreamWriter writer, EvalRangedSequenceTemplate <V, VSequence> o, IList <object> objMap) where VSequence : SequenceTemplate <V> { if (WriteSequenceBase(writer, o, objMap) == false) { return(false); } writer.Write(o.Source1); writer.Write(o.Source2); return(true); }
private static bool WriteElasticEasingCurve(AssetStreamWriter writer, ElasticEasingCurve o, IList <object> objMap) { if (WriteEasingCurve(writer, o, objMap) == false) { return(false); } writer.Write(o.Amplitude); writer.Write(o.Period); return(true); }
public sealed override void Write(AssetStreamWriter writer, T asset) { int count = asset.GetNumberOfKeyframes(); writer.Write(asset.Duration); writer.Write((short)count); for (int i = 0; i < count; i++) { var item = asset.GetKeyframe(i); WriteValue(writer, item.Value); writer.Write(item.Duration); } }
public sealed override void Write(AssetStreamWriter writer, EvalBoard asset) { List <object> objMap = new List <object>(); writer.Write(asset.ClassID); writer.Write(asset.Duration); writer.Write((short)asset.Items.Count); foreach (var item in asset.Items) { writer.WriteBibimString(item.Name); Write(writer, item.Root, objMap); } }
public override void Write(AssetStreamWriter writer, UILayout asset) { List <object> objectDictionary = new List <object>(); writer.Write(asset.ClassID); WriteVisual(writer, asset.Root, objectDictionary); }
public override void Write(AssetStreamWriter writer, SourceTexture2D asset) { writer.Write(asset.ClassID); writer.Write(asset.GraphicsDevice); writer.Write((short)asset.Width); writer.Write((short)asset.Height); writer.Write((short)asset.SurfaceWidth); writer.Write((short)asset.SurfaceHeight); writer.Write((byte)asset.Format); var tag = (SourceTexture2DCookingTag)asset.Tag; writer.Write(tag.Pitch); writer.Write((byte)tag.Compression); writer.Write(tag.Buffer); }
private static void Write(AssetStreamWriter writer, EvalVector4Constant o, IList <object> objMap) { if (WriteConstant(writer, o, objMap)) { writer.Write(o.Value); } }
private static void Write(AssetStreamWriter writer, UICheckBox o, List <object> objectDictionary) { Write(writer, (UIButton)o, objectDictionary); WriteVisual(writer, o.CheckedNormal, objectDictionary); WriteVisual(writer, o.CheckedPushed, objectDictionary); WriteVisual(writer, o.CheckedHovering, objectDictionary); writer.Write(o.IsChecked); }
private static bool WriteGameComponent(AssetStreamWriter writer, GameComponent o, IList <object> objMap) { int index = objMap.IndexOf(o); if (index != -1) { writer.Write(index); return(false); } else { objMap.Add(o); writer.Write(objMap.Count - 1); writer.Write(o.ClassID); return(true); } }
private static void Write(AssetStreamWriter writer, UIPanel o, List <object> objectDictionary) { Write(writer, (UIVisual)o, objectDictionary); writer.Write(o.Children.Count); foreach (UIVisual item in o.Children) { WriteVisual(writer, item, objectDictionary); } }
public static void WriteBody(AssetStreamWriter writer, ImageSet asset) { writer.Write((short)asset.Images.Count); foreach (var item in asset.Images) { writer.WriteBibimString(item.Key); ImageWriter.WriteBody(writer, item.Value); } }
private static void Write(AssetStreamWriter writer, EvalUnitRandom o, IList <object> objMap) { if (WriteEval(writer, o, objMap) == false) { return; } writer.Write(o.InitialSeed); }
private static bool WriteCache <V>(AssetStreamWriter writer, EvalCacheTemplate <V> o, IList <object> objMap) { if (WriteEval(writer, o, objMap) == false) { return(false); } Write(writer, o.Source, objMap); writer.Write((byte)o.UpdateMode); return(true); }
private static bool WriteElement(AssetStreamWriter writer, UIElement o, List <object> objectDictionary) { if (o == null) { writer.Write(-1); return(false); } int index = objectDictionary.IndexOf(o); if (index == -1) { objectDictionary.Add(o); writer.Write(objectDictionary.Count - 1); return(true); } else { writer.Write(index); return(false); } }
private static void WriteEffectMap(AssetStreamWriter writer, UIEffectMap o, List <object> objectDictionary) { if (WriteElement(writer, o, objectDictionary) == false) { return; } Write(writer, (UIElement)o, objectDictionary); WriteGeometryEffect(writer, o.GeometryEffect, objectDictionary); writer.Write((short)o.PixelEffects.Count); foreach (var item in o.PixelEffects) { WritePixelEffect(writer, item, objectDictionary); } }
public static void WriteBody(AssetStreamWriter writer, Sprite asset) { writer.Write((byte)asset.BlendMode); writer.Write(asset.Loop); writer.Write((short)asset.Keyframes.Length); foreach (var item in asset.Keyframes) { writer.WriteURI(item.TextureURI); writer.Write(item.ClippingRectangle); writer.Write((byte)item.AppliedTransform); writer.Write(item.Origin); writer.Write(item.Duration); } }
private static void Write(AssetStreamWriter writer, object o, IList <object> objMap) { if (o == null) { writer.Write((int)-1); return; } #region Generate WriteMethodTable if (writeMethods == null) { Type t = typeof(EvalBoardWriter); MethodInfo[] methods = t.GetMethods(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static); writeMethods = new Dictionary <Type, MethodInfo>(methods.Length); foreach (var item in methods) { if (item.IsStatic && item.Name == "Write") { var parameters = item.GetParameters(); if (parameters.Length == 3) { if (parameters[0].ParameterType == typeof(AssetStreamWriter) && parameters[2].ParameterType == typeof(IList <object>)) { writeMethods.Add(parameters[1].ParameterType, item); } } } } } #endregion MethodInfo mi = null; if (writeMethods.TryGetValue(o.GetType(), out mi)) { mi.Invoke(null, new object[] { writer, o, objMap }); } else { throw new ArgumentException(string.Format("Write Method가 정의되지 않은 형식입니다. {0}", o.GetType()), "o"); } }
private static void Write(AssetStreamWriter writer, EvalTimeflow o, IList <object> objMap) { if (WriteEval(writer, o, objMap) == false) { return; } writer.Write(o.Timeline); writer.Write(o.Duration); writer.Write(o.Velocity); writer.Write((byte)o.StopBehavior); writer.Write(o.IsLooped); writer.Write(o.IsNormalized); }
public static void WriteBody(AssetStreamWriter writer, ParticleSystem asset) { writer.Write(asset.Angle); writer.Write(asset.AngleVariance); writer.Write(asset.BlendFunctionDestination); writer.Write(asset.BlendFunctionSource); writer.Write(asset.Duration); writer.Write((byte)asset.Mode); writer.Write(asset.FinishColor); writer.Write(asset.FinishColorVariance); writer.Write(asset.FinishParticleRotation); writer.Write(asset.FinishParticleRotationVariance); writer.Write(asset.FinishParticleSize); writer.Write(asset.FinishParticleSizeVariance); writer.Write(asset.Gravity); writer.Write(asset.MaxParticles); writer.Write(asset.MaxRadius); writer.Write(asset.MaxRadiusVariance); writer.Write(asset.MinRadius); writer.Write(asset.MinRadiusVariance); writer.Write(asset.ParticleLifespan); writer.Write(asset.ParticleLifespanVariance); writer.Write(asset.RadialAccelVariance); writer.Write(asset.RadialAcceleration); writer.Write(asset.Spin); writer.Write(asset.SpinVariance); writer.Write(asset.RotationIsDirection); writer.Write(asset.SourcePosition); writer.Write(asset.SourcePositionVariance); writer.Write(asset.Speed); writer.Write(asset.SpeedVariance); writer.Write(asset.StartColor); writer.Write(asset.StartColorVariance); writer.Write(asset.StartParticleRotation); writer.Write(asset.StartParticleRotationVariance); writer.Write(asset.StartParticleSize); writer.Write(asset.StartParticleSizeVariance); writer.Write(asset.TangentialAccelVariance); writer.Write(asset.TangentialAcceleration); ImageWriter.WriteBody(writer, asset.Image); }