public bool Delete(StoryShotCtrl shotCtrl) { if (!_shots.Contains(shotCtrl)) { Debug.LogError("StoryBoardCtrl Delete StoryShotCtrl failed:"+shotCtrl.actorName); return false; } _shots.Remove(shotCtrl); return true; }
//增加特定人物时间事件 public void Add(StoryShotCtrl lensCtrl) { _shots.Add(lensCtrl); }
public int indexOf(StoryShotCtrl shotCtrl) { return _shots.IndexOf(shotCtrl); }
public void paste(StoryShotCtrl shotCtrl) { if (shotCtrl == null)return; for (int i = 0; i < shotCtrl.Count; ++i) { StoryBaseCtrl bsCtrl = shotCtrl[i].CopySelf(); bsCtrl.ModInfo(); _listCtrl.Add(bsCtrl); } }
// public void InitStoryBoard(StoryBoardCtrl boardCtrl) { boardCtrl.Clear(); for (int i=0, imax = actorCount; i < imax; ++i) { storyActorInfo actor = _storyActor[i]; StoryShotCtrl lenCtrl = new StoryShotCtrl(); lenCtrl.actor = actor; boardCtrl.Add(lenCtrl); } }
private void ShowEventInfo(StoryShotCtrl lenCtrl) { for (int j = 0; j < lenCtrl.Count; ++j) { StoryBaseCtrl baseCtrl = lenCtrl[j]; GUILayout.BeginHorizontal(); GUILayout.Space(50f); GUILayout.Label(j + ":("+(baseCtrl.isPlaying?"*":"")+baseCtrl.time+"s)" + baseCtrl.ctrlName, GUILayout.Width(200)); if (GUILayout.Button("Editor")) { lenCtrl._objEditorEventCtrl = baseCtrl; } if (GUILayout.Button("Delete")) { lenCtrl.Delete(baseCtrl); } if (GUILayout.Button("Execute")) { lenCtrl.Execute(j); } GUILayout.Space(minRightSpace); GUILayout.EndHorizontal(); } }
//人物信息展示 private void ShowActorInfo() { NGUIEditorTools.SetLabelWidth(80f); bActorInfoFolder = EditorGUILayout.Foldout(bActorInfoFolder, "All Actor Info"); if (bActorInfoFolder == true) { for (int i = 0, imax = objAnimEvent.actorCount; i < imax; ++i) { GUILayout.BeginHorizontal(); storyActorInfo actor = objAnimEvent._storyActor[i]; if (objAnimEvent.Count == 0 && i==objAnimEvent.actorCount-1 && GUILayout.Button("X", GUILayout.Width(20))) { objAnimEvent.DeleteActor(actor); } if (GUILayout.Button("ToBoard", GUILayout.Width(100))) { StoryShotCtrl lenCtrl = new StoryShotCtrl(); lenCtrl.actor = actor; StoryBoardCtrl boardCtrl = objAnimEvent._storyBoard[objAnimEvent.Count - 1]; boardCtrl.Add(lenCtrl); } GUILayout.Label("Actor" + (i + 1) + ": "); //EditorGUILayout.LabelField("Actor" + (i + 1) + ": "); actor.dwModelId = EditorGUILayout.IntField("dwModelID", actor.dwModelId); actor.name = EditorGUILayout.TextField("name", actor.name); GUILayout.EndHorizontal(); } GUILayout.BeginHorizontal(); if (GUILayout.Button("Create", GUILayout.Width(100))) { if (objAnimEvent.bSingleModelID(dwModelID) == true || (EditorUtility.DisplayDialog("已经存在此类型模型", "是否重复创建", "确认", "取消"))) { int nameIndex = objAnimEvent.actorCount + 1; objAnimEvent.AddActor(dwModelID, nameIndex); } } dwModelID = EditorGUILayout.IntField("dwModelID", dwModelID); GUILayout.EndHorizontal(); } }