Exemplo n.º 1
0
        protected void ShowUsefulManagerMessage(eManagers aManager)
        {
            GUILayout.Space(4f);
            Color32 colorValue = Color.black;

            colorValue.a        = 200;
            GUI.backgroundColor = colorValue;
            EditorGUILayout.BeginHorizontal(GUI.skin.textArea);
            if (SceneAutoLoader.IsUsingEnglish)
            {
                ShowAdvancedLabelCenter(new GUIContent(ColorManager.GetColorText("•", aManager, false) + "<color=#ffffff> Useful when combine with the " + ColorManager.GetColorText(aManager.ToString(), aManager, false) + " </color> " + ColorManager.GetColorText("•", aManager, false)));
            }
            else
            {
                ShowAdvancedLabelCenter(new GUIContent(ColorManager.GetColorText("•", aManager, false) + "<color=#ffffff> Utile lorsque combiné avec le " + ColorManager.GetColorText(aManager.ToString(), aManager, false) + " </color> " + ColorManager.GetColorText("•", aManager, false)));
            }
            EditorGUILayout.EndHorizontal();
            GUI.backgroundColor = Color.white;
        }
Exemplo n.º 2
0
        private void CreateStyle()
        {
            m_CustomFont                  = Resources.Load("editorFont") as Font;
            m_CustomFont2                 = Resources.Load("editorFont5") as Font;
            m_TitleStyle                  = new GUIStyle(GUI.skin.label);
            m_TitleStyle.font             = m_CustomFont;
            m_TitleStyle.fontSize         = 14;
            m_TitleStyle.normal.textColor = Color.white;
            m_TitleStyle.alignment        = TextAnchor.MiddleLeft;

            m_TitleCenterStyle                  = new GUIStyle(GUI.skin.label);
            m_TitleCenterStyle.font             = m_CustomFont;
            m_TitleCenterStyle.fontSize         = 14;
            m_TitleCenterStyle.normal.textColor = Color.white;
            m_TitleCenterStyle.alignment        = TextAnchor.MiddleCenter;

            m_SubtitleStyle                  = new GUIStyle(GUI.skin.label);
            m_SubtitleStyle.font             = m_CustomFont2;
            m_SubtitleStyle.fontSize         = 12;
            m_SubtitleStyle.normal.textColor = ColorManager.GetCompagnieBackColor();
            m_SubtitleStyle.alignment        = TextAnchor.MiddleLeft;
            m_SubtitleStyle.richText         = true;

            m_LabelTxtStyleLeft                  = new GUIStyle(GUI.skin.label);
            m_LabelTxtStyleLeft.font             = m_CustomFont2;
            m_LabelTxtStyleLeft.fontSize         = 12;
            m_LabelTxtStyleLeft.normal.textColor = ColorManager.GetCompagnieBackColor();
            m_LabelTxtStyleLeft.richText         = true;
            m_LabelTxtStyleLeft.alignment        = TextAnchor.MiddleLeft;

            m_LabelTxtStyleCenter           = new GUIStyle(m_LabelTxtStyleLeft);
            m_LabelTxtStyleCenter.alignment = TextAnchor.MiddleCenter;

            m_LabelTxtStyleRight           = new GUIStyle(m_LabelTxtStyleLeft);
            m_LabelTxtStyleRight.alignment = TextAnchor.MiddleRight;

            m_LabelTxtStyleCenterSmall          = new GUIStyle(m_LabelTxtStyleCenter);
            m_LabelTxtStyleCenterSmall.fontSize = 8;

            m_RichTxtStyle          = new GUIStyle(GUI.skin.label);
            m_RichTxtStyle.richText = true;

            m_WarningStyle           = new GUIStyle();
            m_WarningStyle           = GUI.skin.label;
            m_WarningStyle.richText  = true;
            m_WarningStyle.fontSize  = 12;
            m_WarningStyle.alignment = TextAnchor.MiddleCenter;

            m_ButtonStyle                   = new GUIStyle(GUI.skin.button);
            m_ButtonStyle.font              = m_CustomFont2;
            m_ButtonStyle.fontSize          = 12;
            m_ButtonStyle.alignment         = TextAnchor.MiddleCenter;
            m_ButtonStyle.richText          = true;
            m_ButtonStyle.normal.textColor  = ColorManager.GetCompagnieBackColor();
            m_ButtonStyle.focused.textColor = CurrentColorDark;
            m_ButtonStyle.active.textColor  = CurrentColor;

            m_ListBtnSelect               = new GUIStyle(GUI.skin.textField);
            m_ListBtnSelect.font          = m_CustomFont2;
            m_ListBtnSelect.fontSize      = 12;
            m_ListBtnSelect.alignment     = TextAnchor.MiddleLeft;
            m_ListBtnSelect.imagePosition = ImagePosition.ImageLeft;
            m_ListBtnSelect.richText      = true;

            m_ListBtnUnselect               = new GUIStyle(GUI.skin.label);
            m_ListBtnUnselect.font          = m_CustomFont2;
            m_ListBtnUnselect.fontSize      = 12;
            m_ListBtnUnselect.alignment     = TextAnchor.MiddleLeft;
            m_ListBtnUnselect.imagePosition = ImagePosition.ImageLeft;
            m_ListBtnUnselect.richText      = true;

            m_TextAreaStyle           = new GUIStyle(GUI.skin.textArea);
            m_TextAreaStyle.font      = m_CustomFont2;
            m_TextAreaStyle.fontSize  = 12;
            m_TextAreaStyle.alignment = TextAnchor.UpperLeft;

            m_ToolTipStyle           = new GUIStyle(GUI.skin.textArea);
            m_ToolTipStyle.font      = m_CustomFont2;
            m_ToolTipStyle.fontSize  = 10;
            m_ToolTipStyle.alignment = TextAnchor.UpperLeft;
            m_ToolTipStyle.richText  = true;


            m_ObjFieldStyle          = new GUIStyle(GUI.skin.label);
            m_ObjFieldStyle.font     = m_CustomFont2;
            m_ObjFieldStyle.fontSize = 12;

            m_FloatFieldStyle           = new GUIStyle(GUI.skin.textField);
            m_FloatFieldStyle.font      = m_CustomFont2;
            m_FloatFieldStyle.fontSize  = 11;
            m_FloatFieldStyle.alignment = TextAnchor.MiddleCenter;

            m_ToggleStyle           = new GUIStyle(GUI.skin.label);
            m_ToggleStyle.font      = m_CustomFont2;
            m_ToggleStyle.fontSize  = 12;
            m_ToggleStyle.alignment = TextAnchor.MiddleLeft;

            m_HelpBoxStyle          = GUI.skin.GetStyle("HelpBox");
            m_HelpBoxStyle.richText = true;
        }
Exemplo n.º 3
0
        protected void ShowNeedManagerMessage(eManagers aManager)
        {
            GUILayout.Space(4f);
            Color32 colorValue = Color.black;

            colorValue.a        = 200;
            GUI.backgroundColor = colorValue;
            EditorGUILayout.BeginHorizontal(GUI.skin.textArea);
            if (SceneAutoLoader.IsUsingEnglish)
            {
                ShowAdvancedLabelCenter(new GUIContent(ColorManager.GetColorText("•", aManager, false) + "<color=#ffffff> Need the " + ColorManager.GetColorText(aManager.ToString(), aManager, false) + " for this option</color> " + ColorManager.GetColorText("•", aManager, false)));
            }
            else
            {
                if (aManager == eManagers.AudioManager || aManager == eManagers.OptionManager)
                {
                    ShowAdvancedLabelCenter(new GUIContent(ColorManager.GetColorText("•", aManager, false) + "<color=#ffffff> Besoin de l'" + ColorManager.GetColorText(aManager.ToString(), aManager, false) + " pour cette option</color> " + ColorManager.GetColorText("•", aManager, false)));
                }
                else
                {
                    ShowAdvancedLabelCenter(new GUIContent(ColorManager.GetColorText("•", aManager, false) + "<color=#ffffff> Besoin du " + ColorManager.GetColorText(aManager.ToString(), aManager, false) + " pour cette option</color> " + ColorManager.GetColorText("•", aManager, false)));
                }
            }
            EditorGUILayout.EndHorizontal();
            GUI.backgroundColor = Color.white;
        }
Exemplo n.º 4
0
        //_______________ Show Default Options Functions _______________\\

        ///<summary> Show the full option for the default Language</summary>
        private void ShowDefaultLanguage()
        {
            ShowTitle("Options de démarrage", eManagers.LanguageManager);

            ShowAdvancedLabelCenter("Set start-up language", m_LabelTxtStyleLeft);
            m_UseDeviceLanguageId = ShowAdvancedBtnChoice(new string[] { "Use device", "Use pre-selected" }, m_UseDeviceLanguageId, 1);
            ShowAdvancedToolTip("Choose if you want your project to start on the <b>" + ColorManager.GetColorText("device", eManagers.LanguageManager, true) + "</b> language or on a <b>" + ColorManager.GetColorText("pre-selected", eManagers.LanguageManager, true) + "</b> language.");

            DrawSeparatorInvisible(true);

            if (m_UseDeviceLanguageId == 0)
            {
                m_UseDeviceLanguage.boolValue = true;
                EditorGUILayout.LabelField("Select the default language (If device language isn't in the list)", m_LabelTxtStyleLeft);
            }
            else
            {
                m_UseDeviceLanguage.boolValue = false;
                EditorGUILayout.LabelField("Select the default language", m_LabelTxtStyleLeft);
            }
            m_CurrentDefaultLanguageId       = ShowAdvancedEnumPopup(GetAvailableLanguageList(), m_CurrentDefaultLanguageId, 4);
            m_DefaultLanguage.enumValueIndex = (int)m_LanguageData.GetLanguage(m_CurrentDefaultLanguageId);
            ShowAdvancedToolTip("Select the<b> " + ColorManager.GetColorText("language your project will start on", eManagers.LanguageManager, true) + "</b> if you are using 'pre-selected' option or if the device language isn't set for your project when using 'device' option.");

            DrawSeparatorInvisible(true);

            EditorGUILayout.LabelField("Select platform", m_LabelTxtStyleLeft);
            m_DefaultPlatform.enumValueIndex = (int)ShowAdvancedEnumPopup(m_DefaultPlatform.enumValueIndex, typeof(eLanguageM_Platform), 4);
            ShowAdvancedToolTip("Select the <b> " + ColorManager.GetColorText("platform in use for this build", eManagers.LanguageManager, true) + "</b>. Change this <b> " + ColorManager.GetColorText("each time", eManagers.LanguageManager, true) + " </b>you build your game for a specific platform (Xbox, Playstation, Pc, etc.)");
        }
Exemplo n.º 5
0
        private void SetText()
        {
            if (!EditorTextIsSet())
            {
                NewEditorText(new string[]
                {
                    "Debugging",
                    "Select gameplay type ( for tips only )",
                    "Solo",
                    "Coop",
                    "Multiplayer",
                    "User",
                    "Select the <i>team</i> of the user.",
                    "If you're doing a <b>" + ColorManager.GetColorText("'one player'", eManagers.SpawnManager, true) + "</b> experience, just select 'Team01' for the player GameObject. You can next choose the others teams for ennemis.",
                    "If you're doing a <b>" + ColorManager.GetColorText("'coop'", eManagers.SpawnManager, true) + "</b> experience, just select 'Team01' for all players GameObject. You can next choose the others teams for ennemis.",
                    "If you're doing a <b>" + ColorManager.GetColorText("'multiplayer pvp'", eManagers.SpawnManager, true) + "</b> experience, you'll probably need to edit player team by code when matchmaking are done, so you can skip this step.",
                    "Select the <i>squad</i> of the user.",
                    "If you're doing a <b>" + ColorManager.GetColorText("'one player'", eManagers.SpawnManager, true) + "</b> experience, you can select the squad to divide NPC Allies or/and NPC Ennemis into different divison.",
                    "If you're doing a <b>" + ColorManager.GetColorText("'coop'", eManagers.SpawnManager, true) + "</b> experience, you can select a different squad for each players, so you can chose where they spawn more accurately with 'Spawn_InitGame' function.",
                    "If you're doing a <b>" + ColorManager.GetColorText("'multiplayer pvp'", eManagers.SpawnManager, true) + "</b> experience, you'll probably need to edit player squad by code when matchmaking are done, so you can skip this step.",
                    "Select the user <i>radius</i>.",
                    "Radius",
                    "Select the radius needed for the user to be able to spawn. [<b>" + ColorManager.GetColorText("To high radius", eManagers.SpawnManager, true) + "</b> : Will block the user to spawn] [<b>" + ColorManager.GetColorText("To small radius", eManagers.SpawnManager, true) + "</b> : Will make the user to spawn into other user]",
                    "Automating",
                    "Enable/Disable the automatic spawn",
                    "Automatic Spawn",
                    "The automatic spawn will use a spawn point <b>" + ColorManager.GetColorText("each time", eManagers.SpawnManager, true) + "</b> the object get activate [OnEnable]. Get also called when the object get instantiated.",
                    "Select the automatic spawn <i>type</i>",
                    "The spawn type allows you to decide how the player/enemy/NPC/Object will appear in game during the automatic spawn."
                }
                              , true);

                NewEditorText(new string[]
                {
                    "Débogage",
                    "Sélectionnez le type de jeu ( pour astuces seulement )",
                    "Solo",
                    "Coop",
                    "Multijoueur",
                    "Utilisateur",
                    "Sélectionnez l'<i>équipe</i> de l'utilisateur.",
                    "Si vous créez une expérience <b>" + ColorManager.GetColorText("'un joueur'", eManagers.SpawnManager, true) + "</b>, simplement sélectionnez 'Team01' pour le joueur. Vous pouvez par la suite choisir les autres équipes pour les ennemis",
                    "Si vous créez une expérience <b>" + ColorManager.GetColorText("'coopérative'", eManagers.SpawnManager, true) + "</b>, simplement sélectionnez 'Team01' pour tout les joueurs. Vous pouvez par la suite choisir les autres équipes pour les ennemis",
                    "Si vous créez une expérience <b>" + ColorManager.GetColorText("'multijoueur jcj'", eManagers.SpawnManager, true) + "</b>, vous devrez probablement modifier les équipes des joueurs par code suite au matchmaking, alors vous pouvez passer cette étape.",
                    "Sélectionnez l'<i>escouade</i> de l'utilisateur.",
                    "Si vous créez une expérience <b>" + ColorManager.GetColorText("'un joueur'", eManagers.SpawnManager, true) + "</b>, vous pouvez sélectionnez des escouades pour diviser les alliées et ennemis en différentes divisions.",
                    "Si vous créez une expérience <b>" + ColorManager.GetColorText("'coopérative'", eManagers.SpawnManager, true) + "</b>, vous pouvez sélectionnez différentes escouades pour chaque joueur, vous permettant ainsi de faire apparraître les joueurs de façon plus précise à l'aide de la fonction 'Spawn_InitGame'",
                    "Si vous créez une expérience <b>" + ColorManager.GetColorText("'multijoueur jcj'", eManagers.SpawnManager, true) + "</b>, vous devrez probablement modifier les escouades des joueurs par code suite au matchmaking, alors vous pouvez passer cette étape.",
                    "Sélectionnez le <i>rayon</i> de l'utilisateur",
                    "Rayon",
                    "Sélectionnez le rayon néccéssaire pour que le joueur puisse 'spawn' en jeu. [<b>" + ColorManager.GetColorText("Rayon trop grand", eManagers.SpawnManager, true) + "</b> : Va empêcher l'utilisateur d'apparraître en jeu] [<b>" + ColorManager.GetColorText("Rayon trop petit", eManagers.SpawnManager, true) + "</b> : Va faire apparraître l'utilisateur dans un autre utilisateur]",
                    "Automatisation",
                    "Activez/Désactivez le <i>spawn automatique</i>",
                    "Spawn automatique",
                    "Le spawn automatique permet d'utiliser un point de spawn à <b>" + ColorManager.GetColorText("chaque fois", eManagers.SpawnManager, true) + "</b> que l'objet est activé [OnEnable]. Aussi appelé lorsque l'objet est instancié.",
                    "Sélectionnez le <i>type</i> de spawn automatique",
                    "Le type de spawn permet de décider comment le joueur/ennemi/PNJ/objet va apparaître en jeu lors du spawn automatique",
                }
                              , false);
            }
        }
Exemplo n.º 6
0
        private void SetText()
        {
            if (!EditorTextIsSet())
            {
                NewEditorText(new string[]
                {
                    "Spawn",
                    "Use for initialisation spawn",
                    "Activate this option if you want this point to be use for an initialisation spawn.<b> " + ColorManager.GetColorText("Initialisation spawn", eManagers.SpawnManager, false) + "</b> are use to instantiate user the first time the scene is load.",
                    "Use squad for initialisation",
                    "Activate this option if you want the initialisation spawn to use <b>" + ColorManager.GetColorText("squad selection", eManagers.SpawnManager, false) + "</b>. [Add a level of precision to tell which user can spawn on it]",
                    "Reset Spawn",
                    "Enable this option if you want this point to be <b>" + ColorManager.GetColorText("reset to a normal spawn", eManagers.SpawnManager, false) + "</b> after the initialisation phase.",
                    "Select the init team",
                    "Select the team that will be able to use this point to spawn during the initialisation phase.",
                    "Select the init squad",
                    "Select the squad that will be able to use this point to spawn during the initialisation phase.",
                    "Disable with initialisation spawn",
                    "Hostile Zone",
                    "Hostile Radius",
                    "Set the radius of the hostile zone. Hostile zone trigger user, then sorts them, then tell other user if the spawn is <b>" + ColorManager.GetColorText("safe or hostile", eManagers.SpawnManager, false) + "</b>.",
                    "Environment",
                    "Layer(s) to stick on",
                    "Stick",
                    "Stick this point on the ground so users won't spawn in the ground or in the air.",
                    "Debugging",
                    "Show spawn point",
                    "Show hostile zone"
                }
                              , true);

                NewEditorText(new string[]
                {
                    "Spawn",
                    "Utilisé pour le spawn initial",
                    "Activé cette option si vous désirez utiliser ce point pour un spawn d'initialisation. Les <b>" + ColorManager.GetColorText("spawn d'initialisation", eManagers.SpawnManager, false) + "</b> sont utilisé pour instancier les utilisateurs la première fius la scène est chargé.",
                    "Utilisé l'escouade pour le spawn initial",
                    "Activé cette option si vous désirez que le spawn d'initialisation utilise la <b>" + ColorManager.GetColorText("selection d'escouade", eManagers.SpawnManager, false) + "</b>. [Ajoute un niveau de précision pour dire qu'elles utilisateurs peut utiliser ce spawn]",
                    "Réinitialiser le spawn",
                    "Activé cette option si vous désirez que ce point sois <b>" + ColorManager.GetColorText("réinitialiser à un spawn standard", eManagers.SpawnManager, false) + "</b> suite à la phase d'initialisation.",
                    "Sélectionnez l'équipe d'initialisation",
                    "Sélectionnez l'équipe qui pourra utiliser ce point pour spawn lors de la phase d'initialisation.",
                    "Sélectionnez l'escouade d'initialisation",
                    "Sélectionnez l'escouade qui pourra utiliser ce point pour spawn lors de la phase d'initialisation.",
                    "Désactivé avec le spawn d'initialisation",
                    "Zone Hostile",
                    "Rayon Hostile",
                    "Défini le rayon de la zone hostile. La zone hostile détecte les utilisateurs, les trie, et finalement dit aux autres utilisateurs si le spawn est <b>" + ColorManager.GetColorText("sécuritaire ou hostile", eManagers.SpawnManager, false) + "</b>.",
                    "Environnement",
                    "Layer(s) à coller",
                    "Coller",
                    "Colle ce point sur le sol pour que les utilisateurs ne spawn pas dans le sol ou dans les airs.",
                    "Débogage",
                    "Afficher les spawns",
                    "Afficher les zones hostiles"
                }
                              , false);
            }
        }