Exemplo n.º 1
0
        public void AddSubHandle(Component comp, Handle parent, Handle.Type type, float time)
        {
            int maxId = 0;

            foreach (var h in m_handles)
            {
                if (maxId <= h.m_id)
                {
                    maxId = h.m_id + 1;
                }
            }

            Handle handleTo = GetByTime(time);
            bool   isExpand = handleTo == null ? true : handleTo.m_seqIsExpand;


            Handle sub = new Handle();

            sub.m_id         = maxId;
            sub.m_delay      = time;
            sub.m_isRealtime = parent.m_isRealtime;
            sub.m_rate       = parent.m_rate;
            sub.SetType(type);
            sub.m_seqIsExpand       = isExpand;
            sub.m_seqIsShow         = true;
            sub.m_isDurationInvalid = handleTo == null ? sub.m_isDurationInvalid : handleTo.m_isDurationInvalid;
            m_handles.Add(sub);
            Sort(this, parent);
        }
Exemplo n.º 2
0
        //增加独有处理
        public void AddPrivateHandle(int state, Handle.Type type)
        {
            State  s = m_states[state];
            Handle h = new Handle();

            h.m_duration      = m_duration;
            h.m_isRealtime    = m_isRealtime;
            h.m_isUseNowStart = true;
            h.SetType(type);
            s.privateHandles.Add(h);
            EditorUtil.SetDirty(this);
        }
Exemplo n.º 3
0
        //增加共有处理
        public void AddPublicHandle(Handle.Type type)
        {
            foreach (State state in m_states)
            {
                Handle h = new Handle();
                h.m_duration      = m_duration;
                h.m_isRealtime    = IsRealTime;
                h.m_isUseNowStart = true;
                h.SetType(type);
                state.publicHandles.Add(h);
            }

            EditorUtil.SetDirty(this);
        }