public void Init(Timeline timeline) { this._timeline = timeline; this._gui = timeline.gui; TimelineCode.Log("(" + this._timeline.name + ") : Init Timeframe Control Seek Insert Segment"); }
public Scene Init(Timeline timeline, Scene scene) { Scenes.timeline = timeline; this.current = scene; TimelineCode.Log("Scene Starting..."); return(scene); }
public void InitGUI(Timeline timeline) { timeline.gui.enabled = GUI.initialized = true; this.onrevert.CallBacks = RevertCallbacks; // Delegated TimelineCode.Log("Timeframe GUI Prepare for (" + timeline.name + ")"); }
public void Start(TimelineCode global, GUI gui) { gui.element = global.seekUI; gui.span = global.spanUI; gui.scrubber = global.scrubberUI; gui.info = global.infoUI; gui.slider = global.sliderUI; }
public void Init(Timeline timeline) { this._timeline = timeline; this._code = timeline.code; this._access = timeline.access; //Test(); TimelineCode.Log("Init Binding"); }
public void Init(Timeline timeline) { this._timeline = timeline; this._scenes = timeline.scenes; this._code = timeline.code; this._gui = timeline.gui; this._timeframe = timeline.timeframe; //timeline.timeframe.AddRevertCallback(timeline.slider_box, testRevert); TimelineCode.Log("(" + this._timeline.name + ") : Init Timeframe Control"); }
public void Init(Timeline timeline) { this._timeline = timeline; this._gui = timeline.gui; this._element = timeline.gui.element; this._span = timeline.gui.span; this._scrubber = timeline.gui.scrubber; this._info = timeline.gui.info; this._slider = timeline.gui.slider; TimelineCode.Log("(" + this._timeline.name + ") : Init Timeframe Control Seek"); }
public override int Segments() { segments[200] = () => { TimelineCode.Log("This is frame 200"); return(0); }; segments[500] = () => { TimelineCode.Log("This is frame 500"); return(0); }; return(0); }
public override int Sounds() { sounds[200] = () => { TimelineCode.Log("This is frame 200"); return(0); }; sounds[500] = () => { TimelineCode.Log("This is frame 500"); return(0); }; return(0); }
public override int Actions() { actions[200] = () => { TimelineCode.Log("This is frame 200"); return(0); }; actions[500] = () => { TimelineCode.Log("This is frame 500"); return(0); }; return(0); }
public void Start(TimelineCode global) { if (!this._gui.enabled) { return; } this._gui.Start(global, this._gui); this.seek.Init(_timeline); this.seek.insert.Init(_timeline); this.seek.insert.action.Init(_timeline); this.seek.insert.comment.Init(_timeline); this.seek.insert.segment.Init(_timeline); this.seek.insert.sound.Init(_timeline); this.seek.insert.dialog.Init(_timeline); this.seek._slider.proxy = new float[1]; Bind.OnRevert(this.seek._slider /* this.gui.slider_box*/, this._code.timeframe, OnRevert); Bind.OnRuntime(this.seek._slider /* this.gui.slider_box*/, this._code.timeframe, OnRuntime); }
private static void OnPlayModeChanged(PlayModeState currentMode, PlayModeState changedMode) { // DO your stuff here... if (changedMode == PlayModeState.AboutToStop || changedMode == PlayModeState.Stopped) { TimelineCode.running = false; } //if (changedMode == PlayModeState.Playing) //TimelineCode.running = true; TimelineCode.Log(currentMode.ToString() + " => " + changedMode.ToString()); if (debugOp) { TimelineCode.Log(EditorApplication.isCompiling); TimelineCode.Log(EditorApplication.isPaused); TimelineCode.Log(EditorApplication.isPlaying); TimelineCode.Log(EditorApplication.isPlayingOrWillChangePlaymode); TimelineCode.Log(EditorApplication.isUpdating); Debug.LogWarning("-------------------------------------"); } }
public void Build(Func <int> CallBack = null) { try { if (binding.proxy == null) { binding.proxy = binding.Agent(); } Finalize(CallBack); } catch (System.IO.IOException e) { // handle(e) TimelineCode.Log("Streaming: No bindings - ref: http:// (" + e + ")"); } finally { TimelineCode.Log("Streaming - "); // Debug.Log("Like what you see? We\'er looking for developers! https://github.com/leroyron/TimelineUnityCode"); } }
void Init() { this._Then = (float value, string ease, int duration, object leapCallback, bool reassign, bool dispose, float?zeroIn, bool skipLeap, ExecParams This) => { TimelineCode.Log("ExecParams Then"); return(This); }; this._Keep = (object leapCallback, bool reassign, bool dispose, float?zeroIn, bool skipLeap, ExecParams This) => { TimelineCode.Log("ExecParams Keep"); return(This); }; this._Wait = (int duration, object leapCallback, bool reassign, bool dispose, float?zeroIn, bool skipLeap, ExecParams This) => { TimelineCode.Log("ExecParams Wait"); return(This); }; this._Hold = (int duration, object leapCallback, bool reassign, bool dispose, float?zeroIn, bool skipLeap, ExecParams This) => { TimelineCode.Log("ExecParams Hold"); return(This); }; this._Pair = (float[] array, object leapCallback, bool reassign, bool dispose, float?zeroIn, bool skipLeap, ExecParams This) => { TimelineCode.Log("ExecParams Pair"); return(This); }; this._Shift = (int shift, object leapCallback, bool reassign, bool dispose, float?zeroIn, bool skipLeap, ExecParams This) => { TimelineCode.Log("ExecParams Shift"); return(This); }; this._Revert = (int from, int to, object leapCallback, bool reassign, bool dispose, float?zeroIn, bool skipLeap, ExecParams This) => { TimelineCode.Log("ExecParams Revert"); return(this); }; this._At = (int at, object leapCallback, bool reassign, bool dispose, float?zeroIn, bool skipLeap, ExecParams This) => { TimelineCode.Log("ExecParams At"); return(This); }; this._Flood = (float value, int from, int to, ExecParams This) => { TimelineCode.Log("ExecParams Flood"); return(This); }; }
// Update is called once per frame void AwakeTimelineCode() { CavButText = GameObject.Find("Canvas/Button/Text").GetComponent <Text>(); timeline1 = timelines[0]; timeline2 = timelines[1]; timeline1.access.defaults.timeframe = "read"; timeline2.access.defaults.timeframe = "thrust"; //// SETUP Timeline ------ timeline1.access.AddUpdateCallback("var 1", (int key) => { Log(key); return(0); }); timeline1.access.AddUpdateCallback("var 2", Test); timeline1.access.AddUpdateCallback("var 3", Test1); timeline1.access.AddDevertCallback(new { var1 = "var1", var2 = 9 }, Test2); //timeline.Params(true, 3, 0, 0, true, 0, -999999, false); // All above variables are declared and assigned and can be used in Scenes App.cs script TimelineCode.scene.Start(timelines); //TimelineCode.Build();// This Is Default TimelineCode.Build = this.AutoBuild; // Reassigned, but Same function as default TimelineCode.Build(); }
public override void Start(Timeline[] timelines) { Init(timelines); var obj = new { position = new { type = "position" }, rotation = new { type = "rotation" } }; var element = new { position = new { x = 10, y = 0.1 }, variable = variable, nodes = timeline.code.binding.Add( new object[] { TimelineCode.timeline1, obj.position, 800, obj.rotation, 801, "x", 100f, "y", 50f, 100f, 801, 802, false } ) }; // TODO Make Queue timeline.code.binding.Queue( new object[] { TimelineCode.timeline1, element.position, 800, 'x', 100f, 'y', 50f, 801, 802, false } ); string tlname = timeline.name; timeline.access.defaults.timeframe = "read"; timeline.timeframe.Update(); Core.Binding bind = timeline.code.binding; Core.Buffer buffer = timeline.code.buffer; Core.TLGameObject earth = new Core.TLGameObject("Earth"); Core.TLTransform earthTransform = earth.transform; bind.Add( new object[] { TimelineCode.timeline1, earthTransform.rotation, 804, earthTransform.position, 805, // give binding it's current position 'x', 0f, // if no value then give current 801, false } ); Core.TLGameObject moon = new Core.TLGameObject("Moon"); Core.TLTransform moonTransform = moon.transform; moon.nodes = timeline.code.binding.Add( new object[] { TimelineCode.timeline1, moonTransform.rotation, 806, 'x', 0f, //'y', 0f, //'z', 0f, 801, false } ); //timeline.code.binding.Test(); buffer.Eval( TimelineCode.timeline1, new object[] { earthTransform.rotation, //earthTransform.position, 'x', 360f, "linear", 2200, earthTransform.position, 'x', 360f, "inSine", 2200 } ); buffer.Eval( TimelineCode.timeline1, new object[] { moonTransform.rotation, 'x', 1080f + 360f, "linear", 2198 }, false, false, (node) => { TimelineCode.Log("This is the end.----------------------------------------------#######"); buffer.ZeroOut(TimelineCode.timeline1, 0, timeline.length, new Core.TLType[] { earthTransform.position }, new string[] { "x" }); return(0); } ); //buffer.ZeroOut(TimelineCode.timeline1, 0, timeline.length, new Core.TLType[]{earthTransform.position}, new string[]{"x"}); TimelineCode.timeline1.timeframe.Process = () => { //Log("TL1"); }; TimelineCode.timeline2.timeframe.Process = () => { //Log("TL2"); }; TimelineCode.timeline1.timeframe.Invoke = () => { //Log("TL1"); }; TimelineCode.timeline2.timeframe.Invoke = () => { //Log("TL2"); }; }
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { int pos = int.Parse(property.propertyPath.Split('[', ']')[1]); // Using BeginProperty / EndProperty on the parent property means that // prefab override logic works on the entire property. EditorGUI.BeginProperty(position, label, property); // Draw label and calculate new position position = EditorGUI.PrefixLabel(position, GUIUtility.GetControlID(FocusType.Passive), new GUIContent(((TimelineCodeAttribute)attribute).names[pos])); // Don't make child fields be indented int indent = EditorGUI.indentLevel; EditorGUI.indentLevel = 0; // Calculate positions and dimensions for the GUI elements // - min-field ... X-pos: 0%, width: 40% \ // - mirror-checkbox ... X-pos: 40%, width: 20% |> 100% of available width // - max-field ... X-pos: 60%, width: 40% / float p1 = position.x; float w1 = 35; Rect nameLabelRect = new Rect(p1, position.y, w1, position.height); float p2 = p1 + w1; float w2 = position.width * 0.30f; Rect nameRect = new Rect(p2, position.y, w2, position.height); float p3 = p2 + w2; float w3 = 35; Rect muteLabelRect = new Rect(p3, position.y, w3, position.height); float p4 = p3 + w3; float w4 = position.width * 0.20f; Rect muteRect = new Rect(p4, position.y, w4, position.height); // Get properties by exactly passing the names of the interval's attributes SerializedProperty nameProp = property.FindPropertyRelative("name"); SerializedProperty muteProp = property.FindPropertyRelative("mute"); TimelineCode tlTarget = (TimelineCode)property.serializedObject.targetObject; bool first = pos == 0; bool last = pos == tlTarget.Timelines.Length - 1; // Draw minimum-field - pass GUIContent.none to not draw the // label of the property EditorGUI.PrefixLabel(nameLabelRect, nameText); EditorGUI.PropertyField(nameRect, nameProp, GUIContent.none); EditorGUI.PrefixLabel(muteLabelRect, muteText); // Draw maximum-field EditorGUI.PropertyField(muteRect, muteProp, GUIContent.none); // Set indent back to what it was EditorGUI.indentLevel = indent; EditorGUI.EndProperty(); int cpLength = tlTarget.Timelines.Length; if (first) { //tlTarget.Update(); } if (last) { } }
static SingleEntryPoint() { TimelineCode.Log("SingleEntryPoint. Up and running"); EditorPlayMode.PlayModeChanged += OnPlayModeChanged; }
public void Init(Timeline timeline) { this._timeline = timeline; TimelineCode.Log("Code Started"); }
public void Init(Timeline timeline) { this._timeline = timeline; TimelineCode.Log("Init Dialog"); }
// CALLBACK Methods // update calls change (GUI, ect...)// not using ! public void AddUpdateCallback(object variableBoxed, Func <int, int> Func) { updateCalls[updateCallCount] = (int count) => { TimelineCode.Log(variableBoxed); return(Func(count)); }; updateCallCount++; }
public void AddDevertCallback(object variableBoxed, Func <object, int, int> Func) { devertCalls[devertCallCount] = (int count) => { TimelineCode.Log(variableBoxed); return(Func(variableBoxed, count)); }; devertCallCount++; }
void Msg(Timeline timeline) { TimelineCode.Log("(" + timeline.name + ")" + " Binding objects to stream - Running queue"); }
public void Init(Timeline timeline) { this._timeline = timeline; TimelineCode.Log("Gui Started"); timeframe.control.Init(timeline); }