/// <summary>
    /// Draws content of the Rogue Settings section.
    /// </summary>
    private void DrawRogueSettings()
    {
        #region Area(RogueSection)
        GUILayout.BeginArea(rogueSection);

        GUILayout.Label("Rogue", skin.GetStyle("RogueH"));

        #region Weapon type Horizontal
        GUILayout.BeginHorizontal();
        GUILayout.Label("Weapon Type: ", skin.GetStyle("RogueInput"));
        rogueData.wpnType = (RogueWpnType)EditorGUILayout.EnumPopup(rogueData.wpnType);
        GUILayout.EndHorizontal();
        #endregion

        #region Strategy type Horizontal
        GUILayout.BeginHorizontal();
        GUILayout.Label("Strategy Type: ", skin.GetStyle("RogueInput"));
        rogueData.strategyType = (RogueStrategyType)EditorGUILayout.EnumPopup(rogueData.strategyType);
        GUILayout.EndHorizontal();
        #endregion

        #region -- Button Create --
        if (GUILayout.Button("Create!", GUILayout.Height(40)))
        {
            GeneralSettings.OpenWindow(GeneralSettings.SettingType.Rogue);
        }
        #endregion

        GUILayout.EndArea();
        #endregion
    }
    //Draw contents of warrior region
    void DrawWarriorSettings()
    {
        GUILayout.BeginArea(warriorSection); //Every begin needs an end just like using "{}"

        GUILayout.Space(iconSize + 8);

        GUILayout.Label("Warrior", skin.GetStyle("MageHeader"));

        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Damage", skin.GetStyle("MageField"));
        warriorData.classType = (Types.WarriorClassType)EditorGUILayout.EnumPopup(warriorData.classType);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Weapon", skin.GetStyle("MageField"));
        warriorData.wpnType = (Types.WarriorWpnType)EditorGUILayout.EnumPopup(warriorData.wpnType);
        EditorGUILayout.EndHorizontal();

        if (GUILayout.Button("Create! ", GUILayout.Height(40)))
        {
            GeneralSettings.OpenWindow(GeneralSettings.SettingsType.WARRIOR);
        }

        GUILayout.EndArea();
    }
예제 #3
0
    void DrawMageSettings()
    {
        // GUILayout.과 EditorLayout의 차이점은 무엇인가?
        // GUILayout은 게임 실행시 보여주는 GUI기능에 촛점이 맞추어져 있고. ( 팝업과 같은 형태의 GUI를 제공하지 않음 )
        // GUIEditorLayout은 에디터상에서 C#와 Java같은 언어들이 제공하는 변수들을 <보여주는데> 촛점이 맞추어져 있다. ( 버튼 제작 기능이 없음 )
        // 그리고 GUILayout.BeginArea()나 EditorLayout.BeginArea()는 기능이 거의 같다.

        GUILayout.BeginArea(mageSectionRect);

        GUILayout.Space(iconSize + 8);
        GUILayout.Label("Mage !");

        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Damage");
        mageData.dmgType = (Types.MageDmgType)EditorGUILayout.EnumPopup(mageData.dmgType);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Weapon");
        mageData.wpnType = (Types.MageWpnType)EditorGUILayout.EnumPopup(mageData.wpnType);
        EditorGUILayout.EndHorizontal();


        // GUILayoutOption은 뭐지?
        if (GUILayout.Button("Create!", GUILayout.Height(40)))
        {
            GeneralSettings.OpenWindow(GeneralSettings.SettingType.Mage);
        }

        GUILayout.EndArea();
    }
    /// <summary>
    /// Draws content of the Mage Settings section.
    /// </summary>
    private void DrawMageSettings()
    {
        #region --- Area(mageSection) ---
        GUILayout.BeginArea(mageSection);

        GUILayout.Space(iconSize + 8f);

        GUILayout.Label("Mage", skin.GetStyle("MageH"));

        #region -- Damage type Horizontal --
        GUILayout.BeginHorizontal();
        GUILayout.Label("Damage Type: ", skin.GetStyle("MageInput"));
        mageData.dmgType = (MageDmgType)EditorGUILayout.EnumPopup(mageData.dmgType);
        GUILayout.EndHorizontal();
        #endregion

        #region -- Weapon type Horizontal --
        GUILayout.BeginHorizontal();
        GUILayout.Label("Weapon Type: ", skin.GetStyle("MageInput"));
        mageData.wpnType = (MageWpnType)EditorGUILayout.EnumPopup(mageData.wpnType);
        GUILayout.EndHorizontal();
        #endregion

        #region -- Button Create --
        if (GUILayout.Button("Create!", GUILayout.Height(40)))
        {
            GeneralSettings.OpenWindow(GeneralSettings.SettingType.Mage);
        }
        #endregion

        GUILayout.EndArea();
        #endregion
    }
    /// <summary>
    /// Draws content of the Warrior Settings section.
    /// </summary>
    private void DrawWarriorSettings()
    {
        #region Area(warriorSection)
        GUILayout.BeginArea(warriorSection);

        GUILayout.Label("Warrior", skin.GetStyle("WarriorH"));

        #region Class type Horizontal
        GUILayout.BeginHorizontal();
        GUILayout.Label("Class Type: ", skin.GetStyle("WarriorInput"));
        warriorData.classType = (WarriorClassType)EditorGUILayout.EnumPopup(warriorData.classType);
        GUILayout.EndHorizontal();
        #endregion

        #region Weapon type Horizontal
        GUILayout.BeginHorizontal();
        GUILayout.Label("Weapon Type: ", skin.GetStyle("WarriorInput"));
        warriorData.wpnType = (WarrirorWpnType)EditorGUILayout.EnumPopup(warriorData.wpnType);
        GUILayout.EndHorizontal();
        #endregion

        #region -- Button Create --
        if (GUILayout.Button("Create!", GUILayout.Height(40)))
        {
            GeneralSettings.OpenWindow(GeneralSettings.SettingType.Warrior);
        }
        #endregion

        GUILayout.EndArea();
        #endregion
    }
    //Draw contents of rogue region
    void DrawRogueSettings()
    {
        GUILayout.BeginArea(rogueSection); //Every begin needs an end just like using "{}"

        GUILayout.Space(iconSize + 8);

        GUILayout.Label("Rogue", skin.GetStyle("MageHeader"));

        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Damage", skin.GetStyle("MageField"));
        rogueData.strategyType = (Types.RogueStrategyType)EditorGUILayout.EnumPopup(rogueData.strategyType);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Weapon", skin.GetStyle("MageField"));
        rogueData.wpnType = (Types.RogueWpnType)EditorGUILayout.EnumPopup(rogueData.wpnType);
        EditorGUILayout.EndHorizontal();

        // GUILayout.FlexibleSpace();
        if (GUILayout.Button("Create! ", GUILayout.Height(40)))
        {
            GeneralSettings.OpenWindow(GeneralSettings.SettingsType.ROGUE);
        }

        GUILayout.EndArea();
    }
예제 #7
0
    private void DrawMageSettings()
    {
        GUILayout.BeginArea(mageerSection);
        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Mage");
        blueSize = (Size)EditorGUILayout.EnumPopup(blueSize);
        EditorGUILayout.EndHorizontal();

        if (GUILayout.Button("Create", GUILayout.Height(40)))
        {
            GeneralSettings.OpenWindow(GeneralSettings.SettingsType.MAGE);
        }

        GUILayout.EndArea();
    }
예제 #8
0
    private void DrawWarriorSettings()
    {
        GUILayout.BeginArea(warriorSection);
        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Warrior");
        yellowSize = (Size)EditorGUILayout.EnumPopup(yellowSize);
        EditorGUILayout.EndHorizontal();

        if (GUILayout.Button("Create", GUILayout.Height(40)))
        {
            GeneralSettings.OpenWindow(GeneralSettings.SettingsType.WARRIOR);
        }

        GUILayout.EndArea();
    }
예제 #9
0
    private void DrawRogueSettings()
    {
        GUILayout.BeginArea(rogueSection);
        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Rogue");
        greenSize = (Size)EditorGUILayout.EnumPopup(greenSize);
        EditorGUILayout.EndHorizontal();

        if (GUILayout.Button("Create", GUILayout.Height(40)))
        {
            GeneralSettings.OpenWindow(GeneralSettings.SettingsType.ROGUE);
        }

        GUILayout.EndArea();
    }
예제 #10
0
 void DrawPanel1Setting()
 {
     GUILayout.BeginArea(panel1Rect);
     GUILayout.Label("Custom Enemy", EditorStyles.boldLabel);
     GUILayout.Space(10f);
     EditorGUILayout.BeginHorizontal();
     GUILayout.Label("Enemy Movement Type");
     enemyData.enemyMovement = (EnemyMovement)EditorGUILayout.EnumPopup(enemyData.enemyMovement);
     EditorGUILayout.EndHorizontal();
     GUILayout.Space(5f);
     if (GUILayout.Button("Create", GUILayout.Height(30)))
     {
         GeneralSettings.OpenWindow(GeneralSettings.SettingsType.ENEMY);
     }
     GUILayout.EndArea();
 }
예제 #11
0
    void DrawMageSettings()
    {
        GUILayout.BeginArea(MageSection);

        GUILayout.Label("Mage");

        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Type");
        MageData.Type = (MageType)EditorGUILayout.EnumPopup(MageData.Type);
        EditorGUILayout.EndHorizontal();

        if (GUILayout.Button("Create", GUILayout.Height(40)))
        {
            GeneralSettings.OpenWindow(GeneralSettings.SettingsType.Mage);
        }

        GUILayout.EndArea();
    }
예제 #12
0
    void DrawBulletSettings()
    {
        GUILayout.BeginArea(bulletSection);

        GUILayout.Space(iconSize + 11);

        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Damage type: ", skin.GetStyle("Label"));
        bulletData.dmgType = (BulletDmgType)EditorGUILayout.EnumPopup(bulletData.dmgType);
        EditorGUILayout.EndHorizontal();

        GUILayout.Space(12);

        if (GUILayout.Button("Create", GUILayout.Height(40)))
        {
            GeneralSettings.OpenWindow();
        }

        GUILayout.EndArea();
    }
    //draw mage content
    void DrawMageSettings()
    {
        GUILayout.BeginArea(mageSection);
        GUILayout.Label("Mage Designer");

        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Damge Type");
        mageData.dmgType = (MAgeDmgType)EditorGUILayout.EnumPopup(mageData.dmgType);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Weapon");
        mageData.wpnType = (MageWpnType)EditorGUILayout.EnumPopup(mageData.wpnType);
        EditorGUILayout.EndHorizontal();
        //return true if i click the button
        if (GUILayout.Button("Create", GUILayout.Height(40)))
        {
            GeneralSettings.OpenWindow(GeneralSettings.SettingsType.MAGE);
        }

        GUILayout.EndArea();
    }
예제 #14
0
    void DrawPanel2Setting()
    {
        GUILayout.BeginArea(panel2Rect);
        GUILayout.Label("Custom Tower", EditorStyles.boldLabel);
        GUILayout.Space(10f);
        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Tower Type    ");
        towerData.towerType = (TowerType)EditorGUILayout.EnumPopup(towerData.towerType);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Choose Enemy");
        towerData.enemySelect = (EnemySelect)EditorGUILayout.EnumPopup(towerData.enemySelect);

        EditorGUILayout.EndHorizontal();
        GUILayout.Space(5f);
        if (GUILayout.Button("Create", GUILayout.Height(30)))
        {
            GeneralSettings.OpenWindow(GeneralSettings.SettingsType.TOWER);
        }
        GUILayout.EndArea();
    }
예제 #15
0
    /// <summary>
    /// Draw contents of Rogue area
    /// </summary>
    private void DrawRogueSettings()
    {
        GUILayout.BeginArea(rogueSection, skin.GetStyle("GeneralPadding"));

        GUILayout.Label("Rogue", skin.GetStyle("TypeHeader"));

        GUILayout.BeginHorizontal(skin.GetStyle("HorizontalLayout"));
        GUILayout.Label("Strategy", skin.GetStyle("LabelField"));
        rogueData.strategyType = (RogueStrategyType)EditorGUILayout.EnumPopup(rogueData.strategyType);
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal(skin.GetStyle("HorizontalLayout"));
        GUILayout.Label("Weapon", skin.GetStyle("LabelField"));
        rogueData.wpnType = (RogueWpnType)EditorGUILayout.EnumPopup(rogueData.wpnType);
        GUILayout.EndHorizontal();

        if (GUILayout.Button("Create!", GUILayout.Height(40)))
        {
            GeneralSettings.OpenWindow(GeneralSettings.SettingsType.ROGUE);
        }

        GUILayout.EndArea();
    }
예제 #16
0
    /// <summary>
    /// Draw contents of Warrior area
    /// </summary>
    private void DrawWarriorSettings()
    {
        GUILayout.BeginArea(warriorSection, skin.GetStyle("GeneralPadding"));

        GUILayout.Label("Warrior", skin.GetStyle("TypeHeader"));

        GUILayout.BeginHorizontal(skin.GetStyle("HorizontalLayout"));
        GUILayout.Label("Class", skin.GetStyle("LabelField"));
        warriorData.classType = (WarriorClassType)EditorGUILayout.EnumPopup(warriorData.classType);
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal(skin.GetStyle("HorizontalLayout"));
        GUILayout.Label("Weapon", skin.GetStyle("LabelField"));
        warriorData.wpnType = (WarriorWpnType)EditorGUILayout.EnumPopup(warriorData.wpnType);
        GUILayout.EndHorizontal();

        if (GUILayout.Button("Create!", GUILayout.Height(40)))
        {
            GeneralSettings.OpenWindow(GeneralSettings.SettingsType.WARRIOR);
        }

        GUILayout.EndArea();
    }
예제 #17
0
    /// <summary>
    /// Draw contents of Mage area
    /// </summary>
    private void DrawMageSettings()
    {
        GUILayout.BeginArea(mageSection, skin.GetStyle("GeneralPadding"));

        GUILayout.Label("Mage", skin.GetStyle("TypeHeader"));

        GUILayout.BeginHorizontal(skin.GetStyle("HorizontalLayout"));
        GUILayout.Label("Damage", skin.GetStyle("LabelField"));
        mageData.dmgType = (MageDmgType)EditorGUILayout.EnumPopup(mageData.dmgType);
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal(skin.GetStyle("HorizontalLayout"));
        GUILayout.Label("Weapon", skin.GetStyle("LabelField"));
        mageData.wpnType = (MageWpnType)EditorGUILayout.EnumPopup(mageData.wpnType);
        GUILayout.EndHorizontal();

        if (GUILayout.Button("Create!", GUILayout.Height(40)))
        {
            GeneralSettings.OpenWindow(GeneralSettings.SettingsType.MAGE);
        }

        GUILayout.EndArea();
    }
    //draw rogue content
    void DrawRogueSettings()
    {
        GUILayout.BeginArea(rogueSection);
        GUILayout.Label("Rogue Designer");

        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Strategy");
        rogueData.strategyType = (RogueStrategyType)EditorGUILayout.EnumPopup(rogueData.strategyType);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Weapon");
        rogueData.wpnType = (RogueWpnType)EditorGUILayout.EnumPopup(rogueData.wpnType);
        EditorGUILayout.EndHorizontal();

        //return true if i click the button
        if (GUILayout.Button("Create", GUILayout.Height(40)))
        {
            GeneralSettings.OpenWindow(GeneralSettings.SettingsType.ROGUE);
        }

        GUILayout.EndArea();
    }
예제 #19
0
    void DrawWarriorSettings()
    {
        GUILayout.BeginArea(WarriorSection);

        GUILayout.Label("Warrior");

        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Type");
        WarriorData.Type = (WarriorType)EditorGUILayout.EnumPopup(WarriorData.Type);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Weapon");
        WarriorData.Weapon = (WarriorWpn)EditorGUILayout.EnumPopup(WarriorData.Weapon);
        EditorGUILayout.EndHorizontal();

        if (GUILayout.Button("Create", GUILayout.Height(40)))
        {
            GeneralSettings.OpenWindow(GeneralSettings.SettingsType.Warrior);
        }

        GUILayout.EndArea();
    }
    //draw warrior content
    void DrawWarriorSettings()
    {
        GUILayout.BeginArea(warriorSection);
        GUILayout.Label("Warrior Designer");

        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Class");
        warriorData.classType = (WarriorClassType)EditorGUILayout.EnumPopup(warriorData.classType);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Weapon");
        warriorData.wpnType = (WarriorWpnType)EditorGUILayout.EnumPopup(warriorData.wpnType);
        EditorGUILayout.EndHorizontal();

        //return true if i click the button
        if (GUILayout.Button("Create", GUILayout.Height(40)))
        {
            GeneralSettings.OpenWindow(GeneralSettings.SettingsType.WARRIOR);
        }

        GUILayout.EndArea();
    }
예제 #21
0
    void DrawPanel3Setting()
    {
        GUILayout.BeginArea(panel3Rect);


        GUILayout.Label("Game Scenarios", EditorStyles.boldLabel);
        GUILayout.Space(5f);

        EditorGUILayout.BeginHorizontal();

        GUILayout.Label("Choose Ending");
        buildManager.ending = (Ending)EditorGUILayout.EnumPopup(buildManager.ending);

        EditorGUILayout.EndHorizontal();

        GUILayout.Space(5f);
        if (GUILayout.Button("Create", GUILayout.Height(30)))
        {
            GeneralSettings.OpenWindow(GeneralSettings.SettingsType.SENERIOS);
        }

        GUILayout.EndArea();
    }
예제 #22
0
    private void OnGUI()
    {
        _canSave = true;

        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Action Name:");
        _actionData.actionName = EditorGUILayout.TextField(_actionData.actionName);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Behaviour");
        _actionData.behaviour =
            (BehaviourData)EditorGUILayout.ObjectField(_actionData.behaviour, typeof(BehaviourData), false);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.Space();
        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Pattern");
        EditorGUILayout.BeginVertical();

        for (int j = 0; j < _actionData.patterns.Count; j++)
        {
            EditorGUILayout.BeginHorizontal();
            if (_actionData.patterns.Count > 1)
            {
                if (GUILayout.Button("^", GUILayout.Width(20)))
                {
                    if (j > 0)
                    {
                        var temp = _actionData.patterns[j];
                        _actionData.patterns.RemoveAt(j);
                        _actionData.patterns.Insert(j - 1, temp);
                    }
                }
                if (GUILayout.Button("v", GUILayout.Width(20)))
                {
                    if (j < _actionData.patterns.Count - 1)
                    {
                        var temp = _actionData.patterns[j];
                        _actionData.patterns.RemoveAt(j);
                        _actionData.patterns.Insert(j + 1, temp);
                    }
                }
            }

            _actionData.patterns[j] =
                (PatternData)EditorGUILayout.ObjectField(_actionData.patterns[j], typeof(PatternData), false);
            EditorGUILayout.EndHorizontal();

            if (_actionData.patterns[j] == null)
            {
                _canSave = false;
            }
        }

        EditorGUILayout.BeginHorizontal();

        if (GUILayout.Button(("-"), GUILayout.Height(20)))
        {
            if (_actionData.patterns.Count > 1)
            {
                _actionData.patterns.RemoveAt(_actionData.patterns.Count - 1);
            }
        }

        if (GUILayout.Button(("+"), GUILayout.Height(20)))
        {
            _actionData.patterns.Add(null);
        }

        EditorGUILayout.EndHorizontal();
        EditorGUILayout.EndVertical();
        EditorGUILayout.EndHorizontal();

        if (!_canSave)
        {
            EditorGUILayout.HelpBox("All [Pattern] needs assigned before it can be created",
                                    MessageType.Warning);
        }
        else if (_actionData.behaviour == null)
        {
            EditorGUILayout.HelpBox("Action needs a [Behaviour] before it can be created",
                                    MessageType.Warning);
        }
        else if (GUILayout.Button(("Save action"), GUILayout.Height(40)))
        {
            SaveAction();
        }

        EditorGUILayout.BeginHorizontal();
        if (GUILayout.Button("Create new behaviour", GUILayout.Height(20)))
        {
            GeneralSettings.OpenWindow(GeneralSettings.SettingType.BEHAVIOUR);
        }
        if (GUILayout.Button("Create new pattern", GUILayout.Height(20)))
        {
            GeneralSettings.OpenWindow(GeneralSettings.SettingType.PATTERN);
        }
        EditorGUILayout.EndHorizontal();
    }