public void Despawn(TimelineEventData data) { TimelineEventButton button = eventButtons.Find((TimelineEventButton b) => b.TimelineEventData == data); eventButtons.Remove(button); Destroy(button.gameObject); }
public void Spawn(TimelineEventData data) { TimelineEventButton newButton = Instantiate(baseEventButton, TimelineEventButtonContainer); newButton.SetTime(this, data, IntervalObjectSpawnInterval, IntervalObjectWidth); eventButtons.Add(newButton); OnEventSelected(data); }
public void OnTimeChanged(TimelineEventData timelineEventData) { TimelineEventButton button = eventButtons.Find((TimelineEventButton b) => b.TimelineEventData == timelineEventData); if (button != null) { button.SetTime(this, timelineEventData, IntervalObjectSpawnInterval, IntervalObjectWidth); } }