public void removePreAction(TimelineInstantAction action) { if (timelineEditInterface != null) { timelineEditInterface.PreActionsEdit.preActionRemoved(action); } action._setTimeline(null); preActions.Remove(action); }
public void addPostAction(TimelineInstantAction action) { action._setTimeline(this); postActions.Add(action); if (timelineEditInterface != null) { timelineEditInterface.PostActionsEdit.postActionAdded(action); } }
public void removePostAction(TimelineInstantAction action) { if (timelineEditInterface != null) { timelineEditInterface.PostActionsEdit.postActionRemoved(action); } int index = postActions.IndexOf(action); postActions.RemoveAt(index); //Adjust the iteration index backwards if the element being removed is before or on the index. //This way nothing gets skipped. if (index != -1 && index <= postActionIndex) { --postActionIndex; } action._setTimeline(null); }