示例#1
0
 void Start()
 {
     highScore               = StatLoader.LoadHighScore();
     score                   = 0;
     ScoreCountText.text     = score.ToString();
     HighScoreCountText.text = highScore.ToString();
 }
示例#2
0
 public override void _Ready()
 {
     SetupStructure();
     testholder = new StatHolder();
     testholder.AddStat(StatLoader.GetStatType("Health"));
     testholder.AddStat(StatLoader.GetStatType("Energy"));
     Test();
 }
示例#3
0
 void Start()
 {
     highScore               = StatLoader.LoadHighScore();
     score                   = 0;
     lives                   = 3;
     wave                    = 1;
     ScoreCountText.text     = score.ToString();
     HighScoreCountText.text = highScore.ToString();
     LivesText.text          = "Lives: " + lives.ToString();
     WaveText.text           = "Wave: " + wave.ToString();
     GameOverText.text       = "";
 }
示例#4
0
        public static async Task <IEnumerable <StatRow> > GetDaylyStat(DateTime from, DateTime to,
                                                                       IEnumerable <Person> persons, IEnumerable <Site> sites)
        {
            var result = new List <StatRow>();

            Status.Current = 0;
            Status.Max     = persons.Count() * sites.Count();
            foreach (Person person in persons)
            {
                foreach (Site site in sites)
                {
                    Status.CurName = string.Format("{0} - {1}", person.Name, site.Url);
                    Status.Current++;
                    var data = await StatLoader.GetStatistics(from, to, person, site);

                    foreach (StatLoader.DataRow dataRow in data)
                    {
                        result.Add(new StatRow(person.Name, dataRow.numberOfNewPages, dataRow.Date));
                    }
                }
            }
            return(result);
            // заглушка - возвращаем фейковые  данные

            /*int days = (int)(to - from).TotalDays;
             * StatusDayly.Max = days;
             * StatusDayly.Current = 0;
             * return await Task<IEnumerable<StatRow>>.Factory.StartNew(() =>
             * {
             *  for (int i = 0; i < days; i++)
             *  {
             *      DateTime date = from.AddDays(i);
             *      StatusDayly.CurName = "Дата: " + date.ToString("yyyy-mm-dd");
             *      StatusDayly.Current = i;
             *      var data = GetStatistics(date, date, persons, sites).Result;
             *      result.AddRange(data);
             *  }
             *  return result;
             *
             * });*/
        }
        public void Check(List <string> mods, List <string> packagePaths)
        {
            Context = new StatLoadingContext();

            LoadStatDefinitions();
            Context.Definitions = Definitions;

            Loader = new StatLoader(Context);

            var visitor = new ModPathVisitor(Mods)
            {
                Game         = LSLib.LS.Story.Compiler.TargetGame.DOS2DE,
                CollectStats = true,
                LoadPackages = LoadPackages
            };

            visitor.Discover(GameDataPath);
            packagePaths.ForEach(path => visitor.DiscoverUserPackages(path));

            // Wildcard value "*" means "all mods"
            if (mods.Count == 1 && mods[0] == "*")
            {
                mods = Mods.Mods.Keys.ToList();
            }

            foreach (var modName in mods)
            {
                LoadMod(modName);
            }

            Loader.ResolveBaseClasses();
            Loader.InstantiateEntities();

            foreach (var message in Context.Errors)
            {
                CompilationDiagnostic(message);
            }
        }