public void _blend_source(float dt) { // 更新下一个镜头源的数据 if (next_camera_source_timer_timer != null) { next_camera_source_timer_timer.OnUpdate(dt); } _dest_source_data = _blend_next(dt); if (next_camera_source_timer_timer != null) { bool reulst = next_camera_source_timer_timer.IsEnd(); if (!reulst) { return; } _list_camera_source_timer.Remove(next_camera_source_timer_timer); int last_index = _list_camera_source_timer.Count - 1; if (last_index >= 0) { _init_next_camera_source(_list_camera_source_timer[last_index]); } else { next_camera_source_timer_timer = null; } } }
// TODO bug不想管了,这里有一个Bug 就是拉回到原始的时候如果有新的节点会有bug public void _on_add_source(System.Object obj) { CameraSource source = obj as CameraSource; if (source == null) { return; } CameraSourceTimer timer = CameraSourceWrapperFactory.Create(source); _list_camera_source_timer.Add(timer); if (next_camera_source_timer_timer == null) { _init_next_camera_source(timer); } }
/// <summary> /// 初始化下一个镜头源 /// </summary> public void _init_next_camera_source(CameraSourceTimer timer) { next_camera_source_timer_timer = timer; _init_camera_source_data(); }