コード例 #1
0
 ///<summary>Code generate</summary>
 internal static void GenerateCode()
 {
     foreach (var scene in scenes)
     {
         foreach (var Lr in  scene._layerList)                    //layers
         {
             foreach (var SO in Lr._objects)
             {
                 if (SO.ImplementationFilePath == null || SO.ImplementationFilePath == "")
                 {
                     string implFileName = BuildSetting.sourceDir + SO.GetImplementationFileName();
                     File.Create(implFileName).Close();
                     SO.ImplementationFilePath = implFileName;
                 }
                 if (SO.DeclarationFilePath == null || SO.DeclarationFilePath == "")
                 {
                     string declFileName = BuildSetting.sourceDir + SO.GetDeclarationFileName();
                     File.Create(declFileName).Close();
                     SO.DeclarationFilePath = declFileName;
                 }
                 SO.GenerateCode();
             }
         }
     }
     {                //layers
         foreach (var i in scenes)
         {
             foreach (var o in i._layerList)
             {
                 writeLayer(BuildSetting.sourceDir + o.GetDeclarationFileName(), BuildSetting.sourceDir + o.GetImplementationFileName(), o);
             }
         }
     }
     {                //scenes
         foreach (var i in scenes)
         {
             writeScene(BuildSetting.sourceDir + i.GetDeclarationFileName(), i);
         }
     }
     {                //mainh
         writeMainH(BuildSetting.sourceDir + "main.h");
     }
     {                //maincpp
         writeMainCpp(BuildSetting.sourceDir + "main.cpp");
     }
 }