Пример #1
0
 /// <a href="http://bit.ly/2Rlzvru">Set a bool field inside a CustomAsset compound object. It checks for read/write and that the field is different before triggering a change</a>
 public static void Set(this WithEmitter asset, ref bool field, bool from)
 {
     asset.Set <bool>(ref field, from);
 }
Пример #2
0
 /// <a href="http://bit.ly/2Rlzvru">Set a float string inside a CustomAsset compound object. It checks for read/write and that the field is different before triggering a change</a>
 public static void Set(this WithEmitter asset, ref string field, string from)
 {
     asset.Set <string>(ref field, from);
 }
Пример #3
0
 /// <a href="http://bit.ly/2Rlzvru">Set a long field inside a CustomAsset compound object. It checks for read/write and that the field is different before triggering a change</a>
 public static void Set(this WithEmitter asset, ref long field, long from)
 {
     asset.Set <long>(ref field, from);
 }
Пример #4
0
 /// <a href="http://bit.ly/2Rlzvru">Set a int field inside a CustomAsset compound object. It checks for read/write and that the field is different before triggering a change</a>
 public static void Set(this WithEmitter asset, ref int field, int from)
 {
     asset.Set <int>(ref field, from);
 }
Пример #5
0
 /// <a href="http://bit.ly/2Rlzvru">Set a double field inside a CustomAsset compound object. It checks for read/write and that the field is different before triggering a change</a>
 public static void Set(this WithEmitter asset, ref double field, double from) =>
 asset.Set(ref field, from, Compare.AlmostEqual);
Пример #6
0
 /// <a href="http://bit.ly/2Rlzvru">Set a Quaternion inside a CustomAsset compound object. It checks for read/write and that the field is approximately different before triggering a change</a>
 public static void Set(this WithEmitter asset, ref Quaternion field, Quaternion from) =>
 asset.Set(ref field, from, (a, b) => a == b);
Пример #7
0
 /// <a href="http://bit.ly/2Rlzvru">Set a Vector4 inside a CustomAsset compound object. It checks for read/write and that the field is approximately different before triggering a change</a>
 public static void Set(this WithEmitter asset, ref Vector4 field, Vector4 from) =>
 asset.Set(ref field, from, (a, b) => a == b);