Esempio n. 1
0
 public void Add(StoryBaseCtrl bsCtrl, int index = -1)
 {
     //Debug.Log("StoryShotCtrl Add StoryBaseCtrl:" + bsCtrl.luaName + ":" + _listCtrl.Count);
     if (index == -1)
     {
         bsCtrl._shotCtrl = this;
         _listCtrl.Add(bsCtrl);
     }
     else
     {
         if (index < 0 || index > _listCtrl.Count)
         {
             Debug.LogWarning("Add StoryBaseCtrl index is out of range:count=" + Count + " index=" + index);
             return;
         }
         bsCtrl._shotCtrl = this;
         _listCtrl.Insert(index, bsCtrl);
     }
 }
    //事件列表区
    private void EventSettting()
    {
        int btnWidth = 200;
        GUILayout.Label("人物相关");
        if (GUILayout.Button("位置", GUILayout.Width(btnWidth)))
        {
            StoryPositionCtrl objCtrl = new StoryPositionCtrl();
            _selectCtrl = objCtrl;
        }
        if (GUILayout.Button("走动", GUILayout.Width(btnWidth)))
        {
            StoryMoveCtrl objCtrl = new StoryMoveCtrl();
            _selectCtrl = objCtrl;

        }
        if (GUILayout.Button("动作", GUILayout.Width(btnWidth)))
        {
            StoryAnimCtrl objCtrl = new StoryAnimCtrl();
            _selectCtrl = objCtrl;

        }
        GUILayout.Label("界面");
        if (GUILayout.Button("对话", GUILayout.Width(btnWidth)))
        {
            StoryTalkCtrl objCtrl = new StoryTalkCtrl();
            _selectCtrl = objCtrl;
        }
        if (GUILayout.Button("图片", GUILayout.Width(btnWidth)))
        {
            StoryPictureCtrl objCtrl = new StoryPictureCtrl();
            _selectCtrl = objCtrl;
        }
        if (GUILayout.Button("描述", GUILayout.Width(btnWidth)))
        {
            StoryUIDescCtrl objCtrl = new StoryUIDescCtrl();
            _selectCtrl = objCtrl;
        }
        if (GUILayout.Button("背景控制", GUILayout.Width(btnWidth)))
        {
            StoryUIBackCtrl objCtrl = new StoryUIBackCtrl();
            _selectCtrl = objCtrl;
        }
        
//         if (GUILayout.Button("选项", GUILayout.Width(btnWidth)))
//         {
//             StoryOptionCtrl objCtrl = new StoryOptionCtrl();
//             _selectCtrl = objCtrl;
//         }
        GUILayout.Label("效果");
        if (GUILayout.Button("特效", GUILayout.Width(btnWidth)))
        {
            StoryEffectCtrl objCtrl = new StoryEffectCtrl();
            _selectCtrl = objCtrl;
        }
        if (GUILayout.Button("音效", GUILayout.Width(btnWidth)))
        {
            StoryMusicCtrl objCtrl = new StoryMusicCtrl();
            _selectCtrl = objCtrl;
        }

        GUILayout.Label("摄像机");
        if (GUILayout.Button("分离", GUILayout.Width(btnWidth)))
        {
            StorySeparateCtrl objCtrl = new StorySeparateCtrl();
            _selectCtrl = objCtrl;
        }
        if (GUILayout.Button("合并", GUILayout.Width(btnWidth)))
        {
            StoryCombineCtrl objCtrl = new StoryCombineCtrl();
            _selectCtrl = objCtrl;
        }
        if (GUILayout.Button("目标", GUILayout.Width(btnWidth)))
        {
            StoryCameraLookCtrl objCtrl = new StoryCameraLookCtrl();
            _selectCtrl = objCtrl;
        }
        if (GUILayout.Button("缓动", GUILayout.Width(btnWidth)))
        {
            StoryCameraSmoothCtrl objCtrl = new StoryCameraSmoothCtrl();
            _selectCtrl = objCtrl;
        }
        if (GUILayout.Button("震屏", GUILayout.Width(btnWidth)))
        {
            StoryCameraShakeCtrl objCtrl = new StoryCameraShakeCtrl();
            _selectCtrl = objCtrl;
        }
        if (GUILayout.Button("广角设置", GUILayout.Width(btnWidth)))
        {
            StoryCameraFovCtrl objCtrl = new StoryCameraFovCtrl();
            _selectCtrl = objCtrl;
        }
        if (GUILayout.Button("淡入淡出", GUILayout.Width(btnWidth)))
        {
            StoryTweenFadeCtrl objCtrl = new StoryTweenFadeCtrl();
            _selectCtrl = objCtrl;
        }
        if (GUILayout.Button("画面去色", GUILayout.Width(btnWidth)))
        {
            StoryGrayscaleCtrl objCtrl = new StoryGrayscaleCtrl();
            _selectCtrl = objCtrl;
        }
        if (GUILayout.Button("蒙太奇", GUILayout.Width(btnWidth)))
        {
            StoryMontageCtrl objCtrl = new StoryMontageCtrl();
            _selectCtrl = objCtrl;
        }
        GUILayout.Label("缓动变换相关");
        if (GUILayout.Button("直线变换", GUILayout.Width(btnWidth)))
        {
            StoryTweenMoveCtrl objCtrl = new StoryTweenMoveCtrl();
            _selectCtrl = objCtrl;
        }
        if (GUILayout.Button("旋转变换", GUILayout.Width(btnWidth)))
        {
            StoryTweenRotateCtrl objCtrl = new StoryTweenRotateCtrl();
            _selectCtrl = objCtrl;
        }
        GUILayout.Label("时间");
        if (GUILayout.Button("等待", GUILayout.Width(btnWidth)))
        {
            _selectCtrl = new StoryTimeCtrl();
        }
    }
 //时间编辑参数
 private void SingleSetting()
 {
     GUILayout.Label("----"+szEditorState+"----");
     if (_animEvent.objEditorShotCtrl._objEditorEventCtrl != null)
     {
         
         _selectCtrl = _animEvent.objEditorShotCtrl._objEditorEventCtrl;
         szEditorState = "修改事件:"+_animEvent.objEditorShotCtrl.actorName+":"+_animEvent.objEditorShotCtrl.indexOf(_selectCtrl);
         //_animEvent.objEditorShotCtrl._objEditorEventCtrl = null;
         _selectCtrl.OnParamGUI();
     }
     else if (_selectCtrl != null)
     {
         szEditorState = "待添加事件";
         _selectCtrl.OnParamGUI();
     }
     drawLine();
     GUILayout.BeginHorizontal();
     _insertIndex = EditorGUILayout.IntField(_insertIndex, GUILayout.Width(30));
     if (GUILayout.Button("添加"))
     {
         if (_selectCtrl == null) return;
         StoryBaseCtrl objCtrl = _selectCtrl.CopySelf();
         objCtrl.ModInfo();
         _animEvent.objEditorShotCtrl.Add(objCtrl, _insertIndex);
         NGUITools.SetDirty(_animEvent);
         _insertIndex = -1;
     }
     if (GUILayout.Button("修改"))
     {
         if (_selectCtrl == null) return;
         _selectCtrl.ModInfo();
         NGUITools.SetDirty(_animEvent);
     }
     if (GUILayout.Button("存储点"))
     {
         if (_selectCtrl == null) return;
         _selectCtrl.SavePoint();
     }
     if (GUILayout.Button("重设"))
     {
         if (_selectCtrl == null) return;
         _selectCtrl.ResetPoint(false);
     }
     if (GUILayout.Button("放弃"))
     {
         if (_selectCtrl != null)
             _selectCtrl.ResetPoint(false);
         _selectCtrl = null;
         if (_animEvent.objEditorShotCtrl != null)
             _animEvent.objEditorShotCtrl._objEditorEventCtrl = null;
     }
     GUILayout.EndHorizontal();
     drawLine();
 }
Esempio n. 4
0
 public int indexOf(StoryBaseCtrl baseCtrl)
 {
     return _listCtrl.IndexOf(baseCtrl);
 }
Esempio n. 5
0
 public bool Delete(StoryBaseCtrl baseCtrl)
 {
     if (!_listCtrl.Contains(baseCtrl))
     {
         Debug.LogError("StoryShotCtrl Delete StoryShotCtrl failed:" + baseCtrl.luaName);
         return false;
     }
     _listCtrl.Remove(baseCtrl);
     return true;
 }
Esempio n. 6
0
 public void OnProxyFinish(StoryBaseCtrl objCtrl)
 {
     objCtrl.OnFinish();
 }
Esempio n. 7
0
 public virtual StoryBaseCtrl CopySelf()
 {
     StoryBaseCtrl obj = new StoryBaseCtrl();
     obj.time = time;
     obj.bWait = bWait;
     obj.bClick = bClick;
     return obj;
 }
Esempio n. 8
0
 public void AddEvent(bool bWait, StoryBaseCtrl bsCtrl, int index = -1)
 {
     bsCtrl.bWait = bWait;
     bsCtrl._baseCtrl = this;
     if (index == -1)
         _listCtrl.Add(bsCtrl);
     else
     {
         if (index < 0 || index > _listCtrl.Count)
         {
             Debug.LogWarning("AddEvent index is out of range:count=" + _listCtrl.Count + " index=" + index);
             return;
         }
         _listCtrl.Insert(index, bsCtrl);
     }
 }