示例#1
0
        BuildTable() // protected constructor to force Singleton instantiation
        {
            CSAI       = CSAI.GetInstance();
            aicallback = CSAI.aicallback;
            logfile    = LogFile.GetInstance();

            modname = aicallback.GetModName();

            logfile.WriteLine("calling GetUnitDefList... ");
            availableunittypes = aicallback.GetUnitDefList();
            logfile.WriteLine("... done");

            if (!LoadCache(modname))
            {
                aicallback.SendTextMsg("Creating new cachefile for mod " + modname, 0);
                GenerateBuildTable(modname);
                SaveCache(modname);
            }
        }
        // protected constructor to force Singleton instantiation
        BuildTable()
        {
            CSAI = CSAI.GetInstance();
            aicallback = CSAI.aicallback;
            logfile = LogFile.GetInstance();

            modname = aicallback.GetModName();

            logfile.WriteLine( "calling GetUnitDefList... " );
            availableunittypes = aicallback.GetUnitDefList();
            logfile.WriteLine( "... done" );

            if( !LoadCache( modname ) )
            {
                aicallback.SendTextMsg( "Creating new cachefile for mod " + modname, 0 );
                GenerateBuildTable( modname );
                SaveCache( modname );
            }
        }