Example #1
0
    private void OnTwieet()
    {
        sound.SetAndPlaySE(14); //ボタン音

        var endname = "BadEnd1";

        switch (nowKind)
        {
        case EndKind.bad2:
            endname = "BadEnd2";
            break;

        case EndKind.good:
            endname = "GoodEnd";
            break;

        case EndKind.normal:
            endname = "NormalEnd";
            break;

        case EndKind.truee:
            endname = "TrueEnd";
            break;
        }
        var text = $"{endname}に到達!";

        UnityRoomTweet.Tweet("exitwith", text, "unityroom", "unity1week", "Exit_With");
    }
Example #2
0
    public void TweetWithHashtags()
    {
#if UNITY_IOS
#else
        UnityRoomTweet.Tweet("wanderlust", "「wanderlust ball」で" + PlayerPrefs.GetFloat("highscore", 0).ToString() + "mの旅をした!", "unityroom", "unity1week");
#endif
    }
    public void Tweet()
    {
        decimal score = 0;

        score = GameObject.Find("Script").GetComponent <ClickerController>().player.score;
        UnityRoomTweet.Tweet(
            "game-tsumutsumu",
            "ゲーム積む積むで" + score.ToString("#,0").Split('.')[0] + "本ゲームを積みました",
            "unity1week");
    }
Example #4
0
        private static void Tweet(string message)
        {
#if UNITY_ANDROID
            var tweetText = message + $"#{GameConfig.GAME_ID}\n";
            tweetText += $"https://play.google.com/store/apps/details?id=com.KitaLab.PuniFlag";
            var url = $"https://twitter.com/intent/tweet?text={UnityWebRequest.EscapeURL(tweetText)}";
            Application.OpenURL(url);
#else
            var tweetText = message + $"#{GameConfig.HASH_TAG1} #{GameConfig.HASH_TAG2} #{GameConfig.GAME_ID}\n";
            UnityRoomTweet.Tweet(GameConfig.GAME_ID, tweetText);
#endif
        }
Example #5
0
        private static void OnPush()
        {
            var tweetText = $"{GetClearText()}\n";

#if UNITY_ANDROID
            var url = $"https://twitter.com/intent/tweet?text={UnityWebRequest.EscapeURL(tweetText)}";
            url += $"&hashtags={UnityWebRequest.EscapeURL(GAME_NAME)}";
            Application.OpenURL(url);
#else
            tweetText += $"#{HASH_TAG} #{GAME_NAME}\n";
            UnityRoomTweet.Tweet(GAME_ID, tweetText);
#endif
        }
Example #6
0
        private void Tweet()
        {
            var totalTime    = ResultEntity.CalcTotalTime();
            var resultRank   = ResultRankList.GetResultRankByTime(totalTime).Rank;
            var nicknameList = PlayerEntity.PlayerList.Select(x => x.NickName).ToList();
            var body         =
                $"【超ハイコンテキスト・オンラインクイズゲーム】\nもじもじフラグメンツで遊んだよ!\n\n【結果】\n時間: {totalTime}秒 / ランク: {resultRank}\n\n【メンバー】\n";

            foreach (var nickName in nicknameList)
            {
                body += $"・{nickName}\n";
            }

            body += "\n";
            UnityRoomTweet.Tweet(Setting.UnityRoomGameId, body, "unity1week", "もじフラ");
        }
Example #7
0
    //public static Scorer CurrentScore { set; get; }

    public static void Tweet()
    {
        UnityRoomTweet.Tweet("marble10", MakeTweetString(), "unityroom", "unity1week");
    }
Example #8
0
    private void Twieet()
    {
        var content = $"ステージ{stageName}で、{score.Score}個の'あ'を詰めました";

        UnityRoomTweet.Tweet("pack_a", content, "unityroom", "unity1week");
    }
Example #9
0
        private void Tweet()
        {
            var body = $"【超ハイコンテキスト・オンラインクイズゲーム】\nもじもじフラグメンツで一緒に遊ぼう!\n";

            UnityRoomTweet.Tweet(Setting.UnityRoomGameId, body, "unity1week", "もじフラ");
        }
Example #10
0
    void Construct()
    {
        this.textResultTime        = this.gameObject.transform.Find("TextResultTime").GetComponent <TextMeshProUGUI>();
        this.textNewRecord         = this.gameObject.transform.Find("TextNewRecord").GetComponent <TextMeshProUGUI>();
        this.textNewRecord.enabled = false;

        this.OnEnableAsObservable()
        .Select(_ => (this.gameMain.time.Value < this.gameMain.shortestTime.Value ||
                      this.gameMain.shortestTime.Value < Mathf.Epsilon))
        .Subscribe(isShortest => {
            Debug.Log("UIFinishController.OnEnableAsObservable(): time=" + this.gameMain.time.Value +
                      ", shortestTime=" + this.gameMain.shortestTime.Value + ", isShortest=" + isShortest.ToString());

            this.rawImageResult.texture = this.screenShotController.textureScreenShot;

            this.textNewRecord.enabled = isShortest;
            if (isShortest)
            {
                this.gameMain.uiFadeIn(this.inputName);
                this.gameMain.uiFadeIn(this.buttonRegister);
                this.sequenceBlink.Play();
            }
            else
            {
                this.gameMain.uiFadeOut(this.inputName, 0.0f);
                this.gameMain.uiFadeOut(this.buttonRegister, 0.0f);
            }
        });

        this.buttonTwitter.OnClickAsObservable()
        .Subscribe(_ => {
            var t        = this.gameMain.time.Value;
            var hashTags = new string[] { "unity1week", };
            UnityRoomTweet.Tweet("landingspace", string.Format("こちら着陸スペース、{0:F2}秒で着陸しましたオーバー。", t), hashTags);
        });
        this.buttonRegister.OnClickAsObservable()
        .Subscribe(_ => {
            var typeInput       = PlayerPrefs.GetInt("PlayerInput", (int)(GameMain.InputType.RotateByLeftRight));
            var bytesScreenShot = this.screenShotController.textureScreenShot.EncodeToPNG();
            StartCoroutine(this.leaderBoardManager.SendScore(this.inputName.text, this.gameMain.time.Value, typeInput, bytesScreenShot, false));
            this.gameMain.uiFadeOut(this);
            this.gameMain.title();
        });

        this.buttonBack.OnClickAsObservable()
        .Subscribe(_ => {
            sequenceBlink.Pause();
            sequenceBlink.Rewind();
            this.textNewRecord.enabled = false;
            this.gameMain.uiFadeOut(this);
            this.gameMain.title();
        });

        this.gameMain.time.Subscribe(_ => {
            this.textResultTime.text = string.Format("{0:F2}", this.gameMain.time.Value);
        });

        this.sequenceBlink = DOTween.Sequence();
        sequenceBlink.Append(this.textNewRecord.DOFade(0.0f, 0.1f));
        sequenceBlink.Append(this.textNewRecord.DOFade(1.0f, 0.1f));
        sequenceBlink.SetLoops(-1);
    }