public void OnAddTrickLine(System.Object obj) { TrackLineInfo info = obj as TrackLineInfo; TrackLineItem item = Instantiate(_trackLinePfb); item.Set(info); GameObjectHelper.SetParent(item.gameObject, _trackLinesParent); _trackItems.Add(item); _info.AddTrackLine(info); }
public void RemoveTrackLine(TrackLineItem item) { _trackItems.Remove(item); Destroy(item.gameObject); }