Esempio n. 1
0
        public static void WinConditionInspectorGUI(WinCondition win)
        {
            win.Condition = EditorGUILayout.MaskField("胜利条件", win.Condition, System.Enum.GetNames(typeof(EnumWinCondition)));
            if (win.Condition == 0)
            {
                win.Condition = 1;
            }

            EditorGUILayout.BeginHorizontal(GUILayout.MaxWidth(Screen.width - 16));
            EditorGUILayout.Space();
            EditorGUILayout.BeginVertical();

            if (EnumTables.MaskFieldIdentify(win.Condition, (int)EnumWinCondition.击败指定Boss))
            {
                win.BossID = EditorGUILayout.IntField("Boss ID", win.BossID);
            }
            if (EnumTables.MaskFieldIdentify(win.Condition, (int)EnumWinCondition.压制指定城池))
            {
                win.CityID = EditorGUILayout.IntField("城池 ID", win.CityID);
            }
            if (EnumTables.MaskFieldIdentify(win.Condition, (int)EnumWinCondition.回合坚持))
            {
                win.Round = EditorGUILayout.IntSlider("回合数", win.Round, 2, 50);
            }

            /*if (EnumTables.MaskFieldIdentify(win.Condition, (int)EnumWinCondition.领主地点撤离))
             * {
             *  EditorGUILayout.BeginHorizontal();
             *  EditorGUILayout.EndHorizontal();
             * }*/
            EditorGUILayout.EndVertical();
            EditorGUILayout.EndHorizontal();
        }
Esempio n. 2
0
    public List <EnumWinCondition> GetAllWinCondition()
    {
        int max = 6;
        List <EnumWinCondition> L = new List <EnumWinCondition>();

        for (int i = 0; i < max; i++)
        {
            if (EnumTables.MaskFieldIdentify(ChapterDef.WinCondition.Condition, i))
            {
                L.Add((EnumWinCondition)i);
            }
        }
        return(L);
    }
Esempio n. 3
0
        public static void FailConditionInspectorGUI(FailCondition fail)
        {
            fail.Condition = EditorGUILayout.MaskField("失败条件", fail.Condition, System.Enum.GetNames(typeof(EnumFailCondition)));

            EditorGUILayout.BeginHorizontal(GUILayout.MaxWidth(Screen.width - 16));
            EditorGUILayout.Space();
            EditorGUILayout.BeginVertical();

            if (EnumTables.MaskFieldIdentify(fail.Condition, (int)EnumFailCondition.人物死亡))
            {
                fail.PlayerID = EditorGUILayout.IntField("人物 ID", fail.PlayerID);
            }
            if (EnumTables.MaskFieldIdentify(fail.Condition, (int)EnumFailCondition.城池被夺))
            {
                fail.CityID = EditorGUILayout.IntField("城池 ID", fail.CityID);
            }
            if (EnumTables.MaskFieldIdentify(fail.Condition, (int)EnumFailCondition.回合达到))
            {
                fail.Round = EditorGUILayout.IntField("回合数", fail.Round);
            }

            EditorGUILayout.EndVertical();
            EditorGUILayout.EndHorizontal();
        }
Esempio n. 4
0
 public bool IsHaveSuperEffect(int SuperEffectType)
 {
     return(EnumTables.MaskFieldIdentify(SuperEffect, SuperEffectType));
 }
Esempio n. 5
0
 public bool HasWinCondition(EnumWinCondition Condition)
 {
     return(EnumTables.MaskFieldIdentify(ChapterDef.WinCondition.Condition, (int)Condition));
 }