Exemplo n.º 1
0
        public void SetMode(InspectorMode mode)
        {
            if (this.inspectorMode == mode)
            {
                return;
            }
            SkillEditor.DoDirtyFsmPrefab();
            EditorPrefs.SetInt(EditorPrefStrings.get_InspectorMode(), (int)mode);
            Keyboard.ResetFocus();
            this.inspectorMode = mode;
            this.ResetView();
            InspectorMode inspectorMode = this.inspectorMode;

            if (inspectorMode != InspectorMode.FsmInspector)
            {
                if (inspectorMode == InspectorMode.Watermarks)
                {
                    WatermarkSelector.Init();
                }
            }
            else
            {
                FsmInspector.Init();
            }
            SkillEditor.Repaint(true);
        }
Exemplo n.º 2
0
 static Gizmos()
 {
     Gizmos.lookupFsmCount = new Dictionary <int, int>();
     Gizmos.itemRect       = default(Rect);
     Gizmos.hierarchyWindowItemCallback = new EditorApplication.HierarchyWindowItemCallback(Gizmos.HierarchyWindowItemCallback);
     Gizmos.EnableHierarchyItemGizmos   = EditorPrefs.GetBool(EditorPrefStrings.get_DrawPlaymakerGizmoInHierarchy(), true);
 }
Exemplo n.º 3
0
        public override void DoGUI()
        {
            SkillEditorStyles.Init();
            GUILayout.BeginVertical(new GUILayoutOption[0]);
            SkillEditorGUILayout.PlaymakerHeader(this);
            GUI.Label(this.versionLabelRect, VersionInfo.PlayMakerVersionLabel, SkillEditorStyles.RightAlignedLabel);
            GUILayout.BeginVertical(new GUILayoutOption[0]);
            GUILayout.Space(20f);
            GUILayout.FlexibleSpace();
            switch (this.pageNumber)
            {
            case 0:
                WelcomeWindow.Link(SkillEditorStyles.SamplesIcon, Strings.get_WelcomeWindow_Samples(), Strings.get_WelcomeWindow_Samples_More(), new WelcomeWindow.LinkFunction(this.OpenUrl), "http://www.hutonggames.com/samples.php");
                WelcomeWindow.Link(SkillEditorStyles.VideoIcon, Strings.get_WelcomeWindow_Tutorials(), Strings.get_WelcomeWindow_Tutorials_More(), new WelcomeWindow.LinkFunction(this.OpenUrl), "http://www.hutonggames.com/tutorials.html");
                WelcomeWindow.Link(SkillEditorStyles.DocsIcon, Strings.get_WelcomeWindow_Docs(), Strings.get_WelcomeWindow_Docs_More(), new WelcomeWindow.LinkFunction(this.OpenUrl), "https://hutonggames.fogbugz.com/default.asp?W1");
                WelcomeWindow.Link(SkillEditorStyles.ForumIcon, Strings.get_WelcomeWindow_Forums(), Strings.get_WelcomeWindow_Forums_More(), new WelcomeWindow.LinkFunction(this.OpenUrl), "http://hutonggames.com/playmakerforum/index.php");
                WelcomeWindow.Link(SkillEditorStyles.AddonsIcon, Strings.get_WelcomeWindow_Addons(), Strings.get_WelcomeWindow_Addons_More(), new WelcomeWindow.LinkFunction(this.GotoPage), 1);
                break;

            case 1:
                WelcomeWindow.Link(SkillEditorStyles.BlackBerryAddonIcon, "BlackBerry Add-On", "NEW! Develop for the new BlackBerry10 platform.", new WelcomeWindow.LinkFunction(this.OpenInAssetStore), "10530");
                WelcomeWindow.Link(SkillEditorStyles.MetroAddonIcon, "Windows Phone 8 Add-On", "NEW! Develop for Windows Phone 8 devices.", new WelcomeWindow.LinkFunction(this.OpenInAssetStore), "10602");
                WelcomeWindow.Link(SkillEditorStyles.MetroAddonIcon, "Windows Store Apps Add-On", "Coming Soon: Develop Windows 8 Store Apps.", new WelcomeWindow.LinkFunction(this.OpenInAssetStore), "http://www.hutonggames.com/store.html");
                if (WelcomeWindow.setupPhoton)
                {
                    WelcomeWindow.Link(SkillEditorStyles.PhotonIcon, Strings.get_WelcomeWindow_Photon_Cloud(), Strings.get_WelcomeWindow_Photon_Cloud_More(), new WelcomeWindow.LinkFunction(this.LaunchPhotonSetupWizard), null);
                }
                else
                {
                    WelcomeWindow.Link(SkillEditorStyles.PhotonIcon, Strings.get_WelcomeWindow_Photon_Cloud(), Strings.get_WelcomeWindow_Photon_Cloud_More(), new WelcomeWindow.LinkFunction(this.OpenUrl), "https://hutonggames.fogbugz.com/default.asp?W928");
                }
                WelcomeWindow.Link(SkillEditorStyles.AddonsIcon, "Browse Add-Ons Online", "Find action packs and add-ons for NGUI, 2D Toolkit, Mecanim, Pathfinding, Smooth Moves, Ultimate FPS...", new WelcomeWindow.LinkFunction(this.OpenUrl), "https://hutonggames.fogbugz.com/default.asp?W714");
                break;
            }
            GUILayout.FlexibleSpace();
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            if (this.pageNumber > 0)
            {
                GUILayout.Space(10f);
                if (GUILayout.Button("Back to Welcome Screen", EditorStyles.get_label(), new GUILayoutOption[0]))
                {
                    this.GotoPage(0);
                    GUIUtility.ExitGUI();
                    return;
                }
                EditorGUIUtility.AddCursorRect(GUILayoutUtility.GetLastRect(), 4);
            }
            GUILayout.FlexibleSpace();
            bool flag = GUILayout.Toggle(this.showAtStartup, Strings.get_WelcomeWindow_Show_at_Startup(), new GUILayoutOption[0]);

            if (flag != this.showAtStartup)
            {
                this.showAtStartup = flag;
                EditorPrefs.SetBool(EditorPrefStrings.get_ShowWelcomeScreen(), this.showAtStartup);
            }
            GUILayout.Space(10f);
            GUILayout.EndHorizontal();
            GUILayout.EndVertical();
            GUILayout.EndVertical();
        }
Exemplo n.º 4
0
        private void SubmitBugReportByMail()
        {
            WWWForm wWWForm = new WWWForm();

            wWWForm.AddField("object", this.description);
            wWWForm.AddField("text", this.BuildReportBody(false));
            wWWForm.AddField("email", this.email);
            EditorPrefs.SetString(EditorPrefStrings.get_BugReportWindow_UserEmail(), this.email);
            this.www = new WWW("www.hutonggames.com/SubmitBug.php", wWWForm);
        }
Exemplo n.º 5
0
        public override void Initialize()
        {
            base.SetTitle(Strings.get_WelcomeWindow_Title());
            base.set_minSize(new Vector2(500f, 440f));
            base.set_maxSize(new Vector2(500f, 441f));
            this.showAtStartup        = EditorPrefs.GetBool(EditorPrefStrings.get_ShowWelcomeScreen(), true);
            WelcomeWindow.setupPhoton = (ReflectionUtils.GetGlobalType("PlayMakerPhotonWizard") != null);
            Rect rect = new Rect(base.get_position());

            rect.set_width(495f);
            rect.set_height(20f);
            this.versionLabelRect = rect;
        }
Exemplo n.º 6
0
        private void Reset()
        {
            string newLine = Environment.get_NewLine();

            this.area           = BugReportWindow.ScoutArea.Editor;
            this.frequencyIndex = 0;
            this.description    = "";
            this.extra          = string.Concat(new string[]
            {
                Strings.get_BugReportWindow_What_happened(),
                newLine,
                newLine,
                newLine,
                newLine,
                Strings.get_BugReportWindow_How_can_we_reproduce_it(),
                newLine,
                newLine
            });
            this.email = EditorPrefs.GetString(EditorPrefStrings.get_UserEmail(), "");
            base.Repaint();
        }