Пример #1
0
    public static void GenerateClassFile(IEnumerable <string> strs)
    {
        var list = ConvertNamesListToCode(strs);

        ScriptGenerators.WriteFile(TagFilePath, list);
        AssetDatabase.Refresh();
    }
Пример #2
0
    private static string ConvertNamesListToCode(IEnumerable <string> strs)
    {
        var sb = new StringBuilder(
            @"namespace ForestOfChaosLib.MenuManaging
{
	[System.Serializable]
	public partial class MenuManager
	{
");

        foreach (var name in strs)
        {
            sb.AppendFormat("\t\tpublic {0} {0};\n", name);
        }
        sb.AppendLine();
        var l = strs.ToList();

        l.Insert(0, "None");
        sb.Append(ScriptGenerators.CreateEnumString("MenuTypes", l));
        sb.Append(
            @"	}
}");
        return(sb.ToString());
    }
 private static void GenerateEnum()
 {
     ScriptGenerators.CreateEnum(PlayerInputManagerWindow.InputManagerEnumName, PlayerInputManager.Inputs.Select(str => str.Axis));
 }
Пример #4
0
 private void SaveDataFile()
 {
     ScriptGenerators.WriteFile(TagFilePath, EnumList);
 }
Пример #5
0
 private void CreateEnum()
 {
     ScriptGenerators.CreateCountEnum(EnumName, EnumList.Select(s => s.ToTitleCase().ReplaceWhiteSpace()));
 }
 private static void WriteDataFile()
 {
     ScriptGenerators.WriteFile(DefineManager.DefineManagerPath, DataList);
 }