Exemple #1
0
    public void startRecording()
    {
        if (!IsSupported() || !IsRecordingSupported())
        {
            return;
        }

        if (!IsRecording())
        {
            SetMaxRecordingMinutesLength(10);

            SetMetadata("about", Locos.Get(LocoKeys.social_everyplay_game_explore_message));
            SetMetadata("game", Locos.Get(LocoKeys.app_display_name));
            SetMetadata("level", Locos.Get(LocoKeys.game_type_arcade));
            SetMetadata("level_name", Locos.Get(LocoKeys.game_type_arcade_mode));

            if (FPSDisplay.isUnder25FPS)
            {
                SetLowMemoryDevice(true);
            }

            #if BROADCAST_USE_EVERYPLAY
            Everyplay.StartRecording();
            #endif

            BroadcastRecordingStart();
        }
    }
    public override void OnButtonClickEventHandler(string buttonName)
    {
        //LogUtil.Log("OnButtonClickEventHandler: " + buttonName);

        if (UIUtil.IsButtonClicked(buttonEarnVideoAds, buttonName))
        {
            LogUtil.Log("buttonEarnVideoAds: " + buttonName);

            AdNetworks.ShowVideoAd();
        }
        else if (UIUtil.IsButtonClicked(buttonEarnOffers, buttonName))
        {
            LogUtil.Log("buttonEarnOffers: " + buttonName);

            AdNetworks.ShowOfferWall();
        }
        else if (UIUtil.IsButtonClicked(buttonEarnMoreGames, buttonName))
        {
            LogUtil.Log("buttonEarnMoreGames: " + buttonName);

            AdNetworks.ShowMoreApps();
        }
        else if (UIUtil.IsButtonClicked(buttonEarnFacebook, buttonName))
        {
            LogUtil.Log("buttonEarnFacebook: " + buttonName);

            OnFacebookLike("default");

            GameCommunity.LikeUrl(
                SocialNetworkTypes.facebook,
                Locos.Get(LocoKeys.app_web_url));
        }
        else if (UIUtil.IsButtonClicked(buttonEarnTwitter, buttonName))
        {
            LogUtil.Log("buttonEarnTwitter: " + buttonName);

            OnTwitterFollow("default");

            Platforms.ShowWebView(
                Locos.Get(LocoKeys.app_display_name),
                Locos.Get(LocoKeys.app_web_url_twitter));
        }
        else if (UIUtil.IsButtonClicked(buttonEarnWebsite, buttonName))
        {
            LogUtil.Log("buttonEarnWebsite: " + buttonName);

            OnWebsiteViewed("default");

            Platforms.ShowWebView(
                Locos.Get(LocoKeys.app_display_name),
                Locos.Get(LocoKeys.app_web_url));
        }
        else if (UIUtil.IsButtonClicked(buttonEarnViewFullscreenAds, buttonName))
        {
            LogUtil.Log("buttonEarnViewFullscreenAds: " + buttonName);

            AdNetworks.ShowFullscreenAd();
        }
    }
        public ActionResult DeleteConfirmed(int id)
        {
            Locos locos = db.Locos.Find(id);

            db.Locos.Remove(locos);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 private void AddLoco(string uri, Locos locos)
 {
     /*HtmlTableExtract table = GetTable(uri, locos);
      *
      * _locos.Add(locos, table);
      * HtmlTableExtractLoco tableLoco = Get(locos);
      *
      * var loco = BuildDB(tableLoco, uri);*/
 }
        public static HtmlTableExtractLoco Get(Locos loco)
        {
            LocomotivesServices ls = ServiceLocator.Instance.GetService <LocomotivesServices>();
            var hte = ls.GetLoco(loco);

            hte.Name = GetEnumDescription((Locos)loco);
            //hte.Name = loco.ToString();
            return(new HtmlTableExtractLoco(hte));
        }
Exemple #6
0
    public virtual void InitLocalization()
    {
        string appDisplayCode = Locos.GetString(LocoKeys.app_display_code);
        string appDisplayName = Locos.GetString(LocoKeys.app_display_name);

        appDisplayCode = Locos.GetString(LocoKeys.app_display_code);

        Debug.Log("InitLocalization:" + " appDisplayCode:" + appDisplayCode);
        Debug.Log("InitLocalization:" + " appDisplayName:" + appDisplayName);
    }
 public ActionResult Edit([Bind(Include = "idLoco,LocoName,State")] Locos locos)
 {
     if (ModelState.IsValid)
     {
         db.Entry(locos).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(locos));
 }
        public ActionResult Create([Bind(Include = "idLoco,LocoName,State")] Locos locos)
        {
            if (ModelState.IsValid)
            {
                db.Locos.Add(locos);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(locos));
        }
        // GET: Locos/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Locos locos = db.Locos.Find(id);

            if (locos == null)
            {
                return(HttpNotFound());
            }
            return(View(locos));
        }
    public void BroadcastGameLevelFinishData(bool showReplayCallout)
    {
        Debug.Log("Broadcast: BroadcastGameLevelFinishData:Starting");

        if (BroadcastNetworks.broadcastNetworksEnabled)
        {
            if (GameProfiles.Current.GetBroadcastRecordLevels())
            {
                if (BroadcastNetworks.IsRecording())
                {
                    Debug.Log("BroadcastGameLevelFinishData" + " record levels:" +
                              GameProfiles.Current.GetBroadcastRecordLevels());

                    BroadcastNetworks.StopRecording();

                    if (showReplayCallout)
                    {
                        ShowBroadcastRecordPlayShare();
                    }

                    GamePlayerRuntimeData runtimeData          = new GamePlayerRuntimeData();
                    GamePlayerController  gamePlayerController = GameController.CurrentGamePlayerController;

                    if (gamePlayerController != null)
                    {
                        runtimeData = gamePlayerController.runtimeData;
                    }

                    string word = GameCommunitySocialController.Instance.GetGameAdjective();

                    BroadcastNetworks.SetMetadata("about",
                                                  word + Locos.Get(LocoKeys.social_everyplay_game_results_message));

                    BroadcastNetworks.SetMetadata("game", Locos.Get(LocoKeys.app_display_name));
                    BroadcastNetworks.SetMetadata("level", Locos.Get(LocoKeys.game_type_arcade));
                    BroadcastNetworks.SetMetadata("level_name", Locos.Get(LocoKeys.game_type_arcade_mode));
                    BroadcastNetworks.SetMetadata("url", Locos.Get(LocoKeys.app_web_url));
                    BroadcastNetworks.SetMetadata("score", runtimeData.score.ToString("N0"));
                    BroadcastNetworks.SetMetadata("scores", runtimeData.scores.ToString("N0"));
                    BroadcastNetworks.SetMetadata("coins", runtimeData.coins.ToString("N0"));
                    BroadcastNetworks.SetMetadata("total_score", runtimeData.totalScoreValue.ToString("N0"));

                    Debug.Log("BroadcastGameLevelFinishData" + " runtimeData.scores:" + runtimeData.scores);
                }
            }
        }
    }
Exemple #11
0
    public void UpdateContent()
    {
        if (string.IsNullOrEmpty(gameLocalizationCode))
        {
            return;
        }

        // Get from code
        string content = Locos.GetString(gameLocalizationCode);

        if (string.IsNullOrEmpty(content))
        {
            // try lookup from current content
            string currentContent     = GetContent();
            string currentContentCode = Locos.GetCodeFromContent(currentContent);

            content = Locos.GetString(currentContentCode);
        }

        if (!string.IsNullOrEmpty(content))
        {
            SetContent(content);
        }
    }
 public HtmlTableExtract GetTable(string uri, Locos locos)
 {
     return(GetTable(uri, locos.ToString()));
 }
 private HtmlTableExtract GetLoco(Locos loco)
 {
     return(_locos[loco]);
 }