Esempio n. 1
0
        /// <summary>
        /// Raises the inspector GUI event.
        /// Draw everything we need to the Editor window.
        /// </summary>
        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            /////Target/////
            myUITransformAnimation = ((UITransformAnimation)target);
            myUIAnimation          = myUITransformAnimation;

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

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

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

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

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