コード例 #1
0
        protected override bool WidgetWriteOper(ILuaState lua, string key)
        {
            switch (key)
            {
                case "cameraParam":
                    _normalInfo.norInfo = LuaExport.GetNormalInfo(lua, -1);
                    break;
                case "step":
                    _normalInfo.step = lua.L_CheckInteger(-1);
                    break;
                case "easetype":
                    _normalInfo.easetype = (iTween.EaseType)lua.L_CheckInteger(-1);
                    break;
                case "type":
                    _normalInfo.type = lua.L_CheckInteger(-1);
                    break;
                case "pathParam":
//                     if (_pathTarget == null)
//                     {
//                         GameObject obj = new GameObject("New Story Path");
//                         _pathTarget = obj.AddComponent<LuaPathCamera>();
//                         _pathTarget.Init();
//                     }
//                     _pathTarget.ImportProperty(-1);
                    _normalInfo.pathName = lua.L_CheckString(-1);
                    _pathTarget = GameObject.Find("StoryPath_juqing").FindInChildren(_normalInfo.pathName).GetComponent<LuaPathCamera>();
                    break;
                default:
                    return base.WidgetWriteOper(lua, key);
            }
            return true;
        }
コード例 #2
0
 /// ////////////////UI显示部分-AddEvent页签中创建相应事件UI显示/////////////////////////////////////////////
 public override void OnParamGUI()
 {
     _normalInfo.type = EditorGUILayout.IntField("dwType", _normalInfo.type);
     if (_normalInfo.type == 0)
     {
         StoryBaseCtrl.OnCameraInfoGUI(ref _normalInfo.norInfo);
         _normalInfo.easetype = (iTween.EaseType)EditorGUILayout.EnumPopup("easetype", _normalInfo.easetype);
         _normalInfo.step = EditorGUILayout.IntField("step", _normalInfo.step);
         if (GUILayout.Button("Smooth"))
         {
             _saveInfo.norInfo = _normalInfo.norInfo;
             _saveInfo.step = _normalInfo.step;
             OnCameraSmooth(_saveInfo);
         }
     }
     else
     {
         _pathTarget = EditorGUILayout.ObjectField(_pathTarget, typeof(LuaPathCamera)) as LuaPathCamera;
     }
     base.OnParamGUI();
 }