Exemplo n.º 1
0
 public OnAutomatineEvent(OnAutomatineEvent.EventType eventType, string activeObjectId, int frame = -1, string message = "")
 {
     this.eventType      = eventType;
     this.activeObjectId = activeObjectId;
     this.frame          = frame;
     this.message        = message;
 }
Exemplo n.º 2
0
        private bool IsEnableEvent(OnAutomatineEvent.EventType eventType, int frame)
        {
            switch (eventType)
            {
            // case AutomatineGUISettings.EVENT_OBJECT_SELECTED: {
            //  return false;
            // }
            // case AutomatineGUISettings.EVENT_TACK_MOVED: {
            //  return false;
            // }
            // case AutomatineGUISettings.EVENT_TACK_DELETE: {
            //  return false;
            // }
            // case AutomatineGUISettings.EVENT_TACK_COPY: {
            //  return false;
            // }

            // case AutomatineGUISettings.EVENT_OBJECT_SELECTED: {
            //  return false;
            // }
            // case AutomatineGUISettings.EVENT_TIMELINE_SORTED: {
            //  return false;
            // }
            case OnAutomatineEvent.EventType.EVENT_TIMELINE_ADDTACK:
            {
                if (frame < 0)
                {
                    return(false);
                }

                foreach (var tackPoint in tackPoints)
                {
                    if (tackPoint.ContainsFrame(frame))
                    {
                        return(false);
                    }
                }
                return(true);
            }

            case OnAutomatineEvent.EventType.EVENT_TIMELINE_DELETE:
            {
                return(true);
            }

            case OnAutomatineEvent.EventType.EVENT_TIMELINE_COPY:
            {
                return(true);
            }


            default:
            {
                Debug.LogWarning("unhandled eventType IsEnableEvent:" + eventType);
                return(false);
            }
            }
        }