Example #1
0
 private IEnumerator PopulateTimelineCoroutine()
 {
     for (int i = 0; i < 10; ++i)
     {
         yield return(null);
     }
     if (TimelineCompatibility.Init())
     {
         PopulateTimeline();
     }
 }
Example #2
0
 private void PopulateTimeline()
 {
     TimelineCompatibility.AddInterpolableModelDynamic(
         owner: PluginName,
         id: "shakingEnabled",
         name: "Shaking Eye Highlights",
         interpolateBefore: (oci, parameter, leftValue, rightValue, factor) => ((EyeShakingController)parameter).EyeShaking = (bool)leftValue,
         interpolateAfter: null,
         isCompatibleWithTarget: (oci) => oci is OCIChar,
         getValue: (oci, parameter) => ((EyeShakingController)parameter).EyeShaking,
         readValueFromXml: (parameter, node) => XmlConvert.ToBoolean(node.Attributes["value"].Value),
         writeValueToXml: (parameter, writer, value) => writer.WriteAttributeString("value", XmlConvert.ToString((bool)value)),
         getParameter: oci => GetController(((OCIChar)oci).GetChaControl()),
         readParameterFromXml: (oci, node) => GetController(((OCIChar)oci).GetChaControl()),
         getFinalName: (currentName, oci, parameter) => "Shaking Eye Highlights");
 }