コード例 #1
0
    /// <summary>
    /// Use this function to show a new editor window for creating a new AnimObject asset.
    /// </summary>
    /// <param name="animController">The AnimationController that this AnimObject will be added to</param>
    /// <param name="animation">Which "Animation" we're adding this AnimObject to</param>
    public static void ShowAddNewAnimObjectWindow(RSRAnimationController animController, AnimObject.AnimationEnum animation)
    {
        window = EditorWindow.GetWindow <AddNewAnimObject>(false, "Add New AnimObject");
        window.SetTargetAnimController(animController);

        /* Now we need to find which Animation we're dealing with */
        window._targetAOH = window._targetAnimController.GetAnimObjectHolders().First(aoh => aoh.GetAnimationEnum() == animation);
    }
コード例 #2
0
    /* Draw the "header" for a single animation type you can create a sequence for.
     * EXAMPLE:
     * 'Animation 1...               (button)[Add AnimObject]' */
    void DrawAnimationTitle(AnimObject.AnimationEnum animEnum)
    {
        GUILayout.BeginHorizontal();
        GUILayout.Label(animEnum.ToString() + " Animation", TitleStyle, GUILayout.Height(20f)); //show title of animation

        if (GUILayout.Button("X", GUILayout.MaxWidth(25f)))
        {
            _animController.RemoveAnimObjectHolder(animEnum);
        }
        GUILayout.FlexibleSpace(); // fill up the middle
        GUILayout.Label(". . .");
        GUILayout.FlexibleSpace();

        //TO-DO: Add in a Button for adding a new AnimObject
        if (GUILayout.Button("Add AnimObject"))
        {
            //TO-DO: Implement adding a new AnimObject
            AddNewAnimObject.ShowAddNewAnimObjectWindow(_animController, animEnum);
        }

        GUILayout.EndHorizontal();
    }
コード例 #3
0
 void CreateNewAddNewAnimObjectWindow(AnimObject.AnimationEnum animationType)
 {
     AddNewAnimObject.ShowAddNewAnimObjectWindow(_animController, animationType);
 }