Example #1
0
    private void RenderAnimationButtons()
    {
        RenderSeparator();
        EditorGUILayout.BeginHorizontal();
        Rect buttonArea = GUILayoutUtility.GetRect(90.0f, 60.0f, GUILayout.ExpandWidth(true));

        if (GUI.Button(buttonArea, "Start Animation"))
        {
            tweenScript.Animate();
        }

        EditorGUILayout.BeginVertical();

        EditorGUILayout.BeginHorizontal();
        buttonArea = GUILayoutUtility.GetRect(5.0f, 30.0f, GUILayout.ExpandWidth(true));
        GUI.color  = Color.yellow;
        if (GUI.Button(buttonArea, "Get initial properties"))
        {
            GetInitialProperties();
        }
        buttonArea = GUILayoutUtility.GetRect(5.0f, 30.0f, GUILayout.ExpandWidth(true));
        if (GUI.Button(buttonArea, "Get final properties"))
        {
            GetFinalProperties();
        }
        GUI.color = Color.white;
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        buttonArea = GUILayoutUtility.GetRect(5.0f, 30.0f, GUILayout.ExpandWidth(true));
        GUI.color  = Color.cyan;
        if (GUI.Button(buttonArea, "Set to initial properties"))
        {
            SetInitialProperties();
        }
        buttonArea = GUILayoutUtility.GetRect(5.0f, 30.0f, GUILayout.ExpandWidth(true));
        if (GUI.Button(buttonArea, "Set to final properties"))
        {
            SetFinalProperties();
        }
        GUI.color = Color.white;
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.EndVertical();
        EditorGUILayout.EndHorizontal();
    }
Example #2
0
 public void PlayAnimation()
 {
     Animation.Animate();
 }