示例#1
0
 public void StartGame()
 {
     if (Gameboard.pictureData == null)
     {
         if (this.Error != null)
         {
             this.Error(Gameboard.LoadError.Unknown);
         }
         Gameboard.pictureData = null;
         return;
     }
     this.currentGUID = AnalyticsUtils.GenerateGUID();
     if (this.Create(Gameboard.pictureData))
     {
         Gameboard.LaunchCount++;
         if (this.Loaded != null)
         {
             this.Loaded();
         }
     }
     if (Gameboard.StartAnalyticEvent != null)
     {
         Gameboard.StartEventType type = Gameboard.StartAnalyticEvent.type;
         if (type != Gameboard.StartEventType.New)
         {
             if (type != Gameboard.StartEventType.Restart)
             {
                 if (type == Gameboard.StartEventType.Continue)
                 {
                     AnalyticsManager.ContinuePic(Gameboard.StartAnalyticEvent.id, Gameboard.StartAnalyticEvent.progress, Gameboard.StartAnalyticEvent.screenFrom, this.paintFill.TexWidth, Gameboard.pictureData.FillType);
                 }
             }
             else
             {
                 AnalyticsManager.RestartPic(Gameboard.StartAnalyticEvent.id, Gameboard.StartAnalyticEvent.progress, Gameboard.StartAnalyticEvent.screenFrom, this.paintFill.TexWidth, Gameboard.pictureData.FillType);
             }
         }
         else
         {
             AnalyticsManager.StartNewColoring(Gameboard.StartAnalyticEvent.id, this.paintFill.TexWidth, Gameboard.pictureData.FillType);
             if (Gameboard.pictureData.PicClass == PicClass.FacebookGift)
             {
                 AnalyticsManager.BonusPictureStartColoring(Gameboard.pictureData.Id);
             }
             else if (Gameboard.pictureData.PicClass == PicClass.Daily)
             {
                 AnalyticsManager.DailyStartColoring(Gameboard.pictureData.Id);
             }
         }
         Gameboard.StartAnalyticEvent = null;
     }
     AnalyticsManager.LevelTryStarted(Gameboard.pictureData.Id, this.currentGUID);
 }