Esempio n. 1
0
        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            //Target
            myMaterialAnimation = ((MaterialAnimation)target);
            myUIAnimation       = myMaterialAnimation;

            /////Sequence/////
            GUILayout.Space(SECTION_SPACE);
            DrawSequence();

            //////Value/////
            GUILayout.Space(SECTION_SPACE);
            DrawValues();

            /////Ease////
            GUILayout.Space(SECTION_SPACE);
            DrawEase();

            /////Curve/////
            DrawCurve();

            /////Apply/////
            ApplyValues();
        }
Esempio n. 2
0
 protected void DrawAddAnimationButtons()
 {
     GUILayout.Space(SECTION_SPACE);
     foreach (MaterialAnimation.AnimationType animationType in Enum.GetValues(typeof(MaterialAnimation.AnimationType)))
     {
         if (GUILayout.Button("Add " + animationType + " Animation"))
         {
             for (int i = 0; i < targets.Length; ++i)
             {
                 MaterialAnimation newUIAnimation = ((UIAnimator)targets [i]).gameObject.AddComponent <MaterialAnimation> ();
                 newUIAnimation.animationType = animationType;
             }
         }
     }
 }