예제 #1
0
파일: OptionTool.cs 프로젝트: kssuab/first
 public static void OpenWindow(EasyFlow easyflow)
 {
     window = (OptionTool)EditorWindow.GetWindow(typeof(OptionTool), false, "EF:OptionTool", true);
     window.autoRepaintOnSceneChange = true;
     window.minSize = new Vector2(440.0f, 145.0f);
     OptionTool.SetEasyflow(easyflow);
 }
예제 #2
0
        private void OnCreateBtn(COVER_MODE coverMode)
        {
            GameObject root     = CreateRoot(coverMode);
            GameObject camera   = CreateCamera(coverMode, root);
            GameObject panel    = CreatePanel(coverMode, root, camera);
            EasyFlow   easyflow = CreateEasyFlow(coverMode, root, panel);

            CreateCover(coverMode, easyflow, panel);
            OptionTool.OpenWindow(easyflow);
        }
예제 #3
0
파일: OptionTool.cs 프로젝트: kssuab/first
        private static void Reset()
        {
            if (Selection.activeGameObject == null ||
                (Selection.activeGameObject != null && Selection.activeGameObject.GetComponent <EasyFlow>() == null))
            {
                OptionTool.SetEasyflow(null);
            }

            Common.UpdateDefine();
        }
예제 #4
0
        public override void OnInspectorGUI()
        {
            if (GUILayout.Button("Open - PresetTool"))
            {
                PresetTool.OpenWindow(target as EasyFlow);
            }

            if (GUILayout.Button("Open - OptionTool"))
            {
                OptionTool.OpenWindow(target as EasyFlow);
            }

            //DrawDefaultInspector();
        }
예제 #5
0
        private void OnEnable()
        {
            switch (SettingData.GetInstance().linkMode)
            {
            case LINK_MODE.Link:
                if (Selection.activeGameObject != null)
                {
                    EasyFlow easyflow = Selection.activeGameObject.GetComponent <EasyFlow>();
                    OptionTool.SetEasyflow(easyflow);
                    PresetTool.SetEasyflow(easyflow);
                }
                else
                {
                    OptionTool.SetEasyflow(null);
                    PresetTool.SetEasyflow(null);
                }
                break;

            case LINK_MODE.OpenPresetTool:
                if (Selection.activeGameObject != null)
                {
                    EasyFlow easyflow = Selection.activeGameObject.GetComponent <EasyFlow>();
                    if (easyflow != null)
                    {
                        PresetTool.OpenWindow(easyflow);
                    }
                }
                break;

            case LINK_MODE.OpenOptionTool:
                if (Selection.activeGameObject != null)
                {
                    EasyFlow easyflow = Selection.activeGameObject.GetComponent <EasyFlow>();
                    if (easyflow != null)
                    {
                        OptionTool.OpenWindow(easyflow);
                    }
                }
                break;
            }
        }
예제 #6
0
파일: OptionTool.cs 프로젝트: kssuab/first
 private void OnFocus()
 {
     window = this;
     Reset();
 }
예제 #7
0
파일: OptionTool.cs 프로젝트: kssuab/first
 private void OnSelectionChange()
 {
     window = this;
     Reset();
 }
예제 #8
0
파일: OptionTool.cs 프로젝트: kssuab/first
 private void OnEnable()
 {
     window = this;
     Reset();
 }