コード例 #1
0
        public void EventLineContextMenuAdd(object obj)
        {
            AnimationEventTimeLine.EventLineContextMenuObject eventLineContextMenuObject = (AnimationEventTimeLine.EventLineContextMenuObject)obj;
            int index = AnimationEventPopup.Create(eventLineContextMenuObject.m_Animated, eventLineContextMenuObject.m_Clip, eventLineContextMenuObject.m_Time, this.m_Owner);

            this.Select(eventLineContextMenuObject.m_Clip, index);
        }
コード例 #2
0
 private void AddEventButtonOnGUI()
 {
     if (GUILayout.Button(AnimationWindowStyles.addEventContent, EditorStyles.toolbarButton, new GUILayoutOption[0]))
     {
         AnimationEventPopup.Create(this.m_State.activeRootGameObject, this.m_State.activeAnimationClip, this.m_State.currentTime, this.m_OwnerWindow);
     }
 }
コード例 #3
0
        public void AddEvent(AnimationWindowState state)
        {
            float time  = ((float)state.frame) / state.frameRate;
            int   index = AnimationEventPopup.Create(state.activeRootGameObject, state.activeAnimationClip, time, this.m_Owner);

            this.Select(state.activeAnimationClip, index);
        }
コード例 #4
0
        public void EventLineContextMenuAdd(object obj)
        {
            EventLineContextMenuObject obj2 = (EventLineContextMenuObject)obj;
            int index = AnimationEventPopup.Create(obj2.m_Animated, obj2.m_Clip, obj2.m_Time, this.m_Owner);

            this.Select(obj2.m_Clip, index);
            this.m_EventsSelected        = new bool[AnimationUtility.GetAnimationEvents(obj2.m_Clip).Length];
            this.m_EventsSelected[index] = true;
        }
コード例 #5
0
        public void EventLineContextMenuAdd(object obj)
        {
            AnimationEventTimeLine.EventLineContextMenuObject eventLineContextMenuObject = (AnimationEventTimeLine.EventLineContextMenuObject)obj;
            int num = AnimationEventPopup.Create(eventLineContextMenuObject.m_Animated, eventLineContextMenuObject.m_Clip, eventLineContextMenuObject.m_Time, this.m_Owner);

            this.Select(eventLineContextMenuObject.m_Clip, num);
            this.m_EventsSelected      = new bool[AnimationUtility.GetAnimationEvents(eventLineContextMenuObject.m_Clip).Length];
            this.m_EventsSelected[num] = true;
        }
コード例 #6
0
ファイル: AnimEditor.cs プロジェクト: yiifans/UnityDecompiled
        private void AddEventButtonOnGUI()
        {
            if (this.m_State.policy != null && !this.m_State.policy.allowAddEvent)
            {
                return;
            }
            AnimationWindowSelectionItem selectedItem = this.m_State.selectedItem;

            if (selectedItem != null)
            {
                using (new EditorGUI.DisabledScope(!selectedItem.animationIsEditable))
                {
                    if (GUILayout.Button(AnimationWindowStyles.addEventContent, EditorStyles.toolbarButton, new GUILayoutOption[0]))
                    {
                        AnimationEventPopup.Create(selectedItem.rootGameObject, selectedItem.animationClip, this.m_State.currentTime - selectedItem.timeOffset, this.m_OwnerWindow);
                    }
                }
            }
        }
コード例 #7
0
        public void AddEvent(float time, GameObject rootGameObject, AnimationClip animationClip)
        {
            int index = AnimationEventPopup.Create(rootGameObject, animationClip, time, this.m_Owner);

            this.Select(animationClip, index);
        }