public override object Read <T>(ES3Reader reader) { var instance = new UnityEngine.ParticleSystem.InheritVelocityModule(); ReadInto <T>(reader, instance); return(instance); }
/// <summary> /// Read the data using the reader. /// </summary> /// <param name="reader">Reader.</param> public override object Read(ISaveGameReader reader) { UnityEngine.ParticleSystem.InheritVelocityModule inheritVelocityModule = new UnityEngine.ParticleSystem.InheritVelocityModule(); foreach (string property in reader.Properties) { switch (property) { case "enabled": inheritVelocityModule.enabled = reader.ReadProperty <System.Boolean> (); break; case "mode": inheritVelocityModule.mode = reader.ReadProperty <UnityEngine.ParticleSystemInheritVelocityMode> (); break; case "curve": inheritVelocityModule.curve = reader.ReadProperty <UnityEngine.ParticleSystem.MinMaxCurve> (); break; case "curveMultiplier": inheritVelocityModule.curveMultiplier = reader.ReadProperty <System.Single> (); break; } } return(inheritVelocityModule); }
/// <summary> /// Write the specified value using the writer. /// </summary> /// <param name="value">Value.</param> /// <param name="writer">Writer.</param> public override void Write(object value, ISaveGameWriter writer) { UnityEngine.ParticleSystem.InheritVelocityModule inheritVelocityModule = (UnityEngine.ParticleSystem.InheritVelocityModule)value; writer.WriteProperty("enabled", inheritVelocityModule.enabled); writer.WriteProperty("mode", inheritVelocityModule.mode); writer.WriteProperty("curve", inheritVelocityModule.curve); writer.WriteProperty("curveMultiplier", inheritVelocityModule.curveMultiplier); }
protected override void GetDependencies(System.Collections.Generic.Dictionary <long, UnityEngine.Object> dependencies, object obj) { base.GetDependencies(dependencies, obj); if (obj == null) { return; } UnityEngine.ParticleSystem.InheritVelocityModule o = (UnityEngine.ParticleSystem.InheritVelocityModule)obj; GetDependencies(curve, o.curve, dependencies); }
public override void ReadFrom(object obj) { base.ReadFrom(obj); if (obj == null) { return; } UnityEngine.ParticleSystem.InheritVelocityModule o = (UnityEngine.ParticleSystem.InheritVelocityModule)obj; enabled = o.enabled; mode = (uint)o.mode; curve = Read(curve, o.curve); curveMultiplier = o.curveMultiplier; }
public override object WriteTo(object obj, System.Collections.Generic.Dictionary <long, UnityEngine.Object> objects) { obj = base.WriteTo(obj, objects); if (obj == null) { return(null); } UnityEngine.ParticleSystem.InheritVelocityModule o = (UnityEngine.ParticleSystem.InheritVelocityModule)obj; o.enabled = enabled; o.mode = (UnityEngine.ParticleSystemInheritVelocityMode)mode; o.curve = Write(o.curve, curve, objects); o.curveMultiplier = curveMultiplier; return(o); }