예제 #1
0
        /// <summary>
        /// コンテンツに対応するテキストを返す
        /// </summary>
        /// <param name="cat"></param>
        /// <returns></returns>
        public static string GetContentText(ContentCategoly cat)
        {
            switch (cat)
            {
            case ContentCategoly.home:
                return("おまかせ");

            case ContentCategoly.news:
                return("ニュース");

            case ContentCategoly.matome:
                return("まとめ");

            case ContentCategoly.retweet:
                return("リツイート");

            case ContentCategoly.hotPicture:
                return("話題の画像");

            case ContentCategoly.hotHash:
                return("ハッシュ");

            default:
                return("");
            }
        }
예제 #2
0
 //====================================================================
 //
 //                           初期化処理
 //
 //====================================================================
 #region 初期化処理
 /// <summary>
 /// コンストラクター
 /// </summary>
 /// <param name="parent"></param>
 public TopicPanel(GameObject parent, GameObject PrefabNewsPanel, float offsetY, ContentCategoly Categoly)
 {
     this.Categoly = Categoly;
     this.Panel    = PrefabNewsPanel;
     Init(offsetY, parent);
     SetEvent();
 }
예제 #3
0
        /// <summary>
        /// 特定の話題をおしゃべり
        /// </summary>
        /// <param name="DataKey"></param>
        public void SetTopicTalkFromLastNewsList(string DataKey, ContentCategoly NewsSource)
        {
            //次の話題をロードする
            MsgTopic topic = LiplisStatus.Instance.NewTopic.SearchTopic(DataKey, LiplisModels.Instance.GetModelList());

            //Topicが取得できたら、なうろーどに入れて終了
            if (topic != null)
            {
                //対象リストを洗い替えする
                LiplisStatus.Instance.NewsList.DequeueKeyNewsList(NewsSource, DataKey);

                //カテゴリ修正
                topic.TopicClassification = ((int)NewsSource).ToString();

                //ナウロードセット
                this.NowLoadTopic = topic;

                //ログ追加
                LiplisTalkLog.Instance.AddLog(this.NowLoadTopic.Clone());

                //話題のセット、移動
                StartCoroutine(SetToipcEnd());

                return;
            }

            //Clalisサーバーから対象データ取得
            StartCoroutine(SetTopicTalkFromClalis(DataKey, NewsSource));
        }
예제 #4
0
    //====================================================================
    //
    //                          メニュー操作
    //
    //====================================================================
    #region メニュー操作

    /// <summary>
    /// コンテンツ切り替え
    /// </summary>
    /// <param name="nextContent"></param>
    /// <returns></returns>
    IEnumerator SwitchContent(ContentCategoly nextContent)
    {
        if (CurrentContentCategoly != nextContent)
        {
            //フェードアウト
            coverUI.FadeOut(DURATION_FAID_OUT);
            yield return(new WaitForSeconds(DURATION_FAID_OUT));

            //現在のオブジェクトを無効にする
            ContentsPage[(int)CurrentContentCategoly].gameObject.SetActive(false);

            //モード変更
            CurrentContentCategoly = nextContent;
            ChangeMode(nextContent);

            //新しくセットしたオブジェクトを有効にする
            ContentsPage[(int)CurrentContentCategoly].gameObject.SetActive(true);

            //フェードイン
            yield return(new WaitForSeconds(DURATION_FAID_IN));

            coverUI.FadeIn(DURATION_FAID_IN);
        }
        else
        {
            //変更がなければ現在のオブジェクトを有効化
            ContentsPage[(int)CurrentContentCategoly].gameObject.SetActive(true);
            yield break;
        }
    }
예제 #5
0
    private IEnumerator SetTopicTalkFromClalis(string DataKey, ContentCategoly NewsSource)
    {
        //トピックをランダムで取得する
        var Async = ClalisForLiplisGetNewTopicOne.GetNewTopicAsync(LiplisStatus.Instance.NewTopic.ToneUrlList, DataKey, ((int)NewsSource).ToString());

        //非同期実行
        yield return(Async);

        //取得結果取得
        ResLpsTopicList resTopic = (ResLpsTopicList)Async.Current;

        //現在ロード中の話題をおしゃべり済みに入れる
        if (resTopic != null)
        {
            //話題取得
            this.NowLoadTopic = resTopic.topicList[0];

            //カテゴリセット
            this.NowLoadTopic.TopicClassification = ((int)NewsSource).ToString();

            //おしゃべり済みに追加
            LiplisStatus.Instance.NewTopic.ChattedKeyList.AddToNotDuplicate(this.NowLoadTopic.Clone());

            //話題のセット、移動
            StartCoroutine(SetToipcEnd());

            //ログ追加
            StartCoroutine(NewsLog.AddLog(this.NowLoadTopic.Clone()));
        }
        else
        {
            //だめなら、デフォルト処理
            SetTopicTalkTopicList();
        }
    }
예제 #6
0
        /// <summary>
        /// 指定キーで次の話題をセットする
        /// </summary>
        /// <param name="DataKey"></param>
        /// <param name="Categoly"></param>
        public void SetNextTopic(string DataKey, ContentCategoly Categoly)
        {
            //ウインドウを一旦クリア
            DestroyAllWindow();

            //トピックをセットする
            SetTopicTalkFromLastNewsList(DataKey, Categoly);
        }
예제 #7
0
        /// <summary>
        /// ログから指定のログの話題をおしゃべり
        /// </summary>
        /// <param name="DataKey"></param>
        /// <param name="NewsSource"></param>
        public void SetTopicTalkFromLastNewsListFromLog(string DataKey, ContentCategoly NewsSource)
        {
            //ウインドウを一旦クリア
            DestroyAllWindow();

            //おしゃべり
            SetTopicTalkFromLastNewsList(DataKey, NewsSource);
        }
예제 #8
0
    //====================================================================
    //
    //                         ゲーミング処理
    //
    //====================================================================
    #region ゲーミング処理
    /// <summary>
    /// モード変更時処理
    /// </summary>
    /// <param name="mode"></param>
    private void ChangeMode(ContentCategoly mode)
    {
        try
        {
            //モードを設定
            LiplisStatus.Instance.EnvironmentInfo.SelectMode = mode;

            //テキスト修正
            TxtTopicMode.text = ContentCategolyText.GetContentText(mode);

            //モード別処理
            CreateTbt();
        }
        catch
        {
        }
    }
예제 #9
0
    IEnumerator SwitchContent(ContentCategoly nextContent)
    {
        if (m_CurrentContentCategoly != nextContent)
        {
            coverUI.FadeOut(m_FadeOutDuration);
            yield return(new WaitForSeconds(m_FadeOutDuration));

            m_Contents[(int)m_CurrentContentCategoly].gameObject.SetActive(false);
            m_CurrentContentCategoly = nextContent;
            m_Contents[(int)m_CurrentContentCategoly].gameObject.SetActive(true);

            yield return(new WaitForSeconds(m_FadeInDuration));

            coverUI.FadeIn(m_FadeInDuration);
        }
        else
        {
            m_Contents[(int)m_CurrentContentCategoly].gameObject.SetActive(true);
            yield break;
        }
    }
예제 #10
0
 public void DequeueKeyNewsList(ContentCategoly NewsSource, string DATAKEY)
 {
     if (LiplisStatus.Instance.EnvironmentInfo.SelectMode == ContentCategoly.news)
     {
         DequeueKey(ref LastNewsQ.NewsList, DATAKEY);
     }
     else if (LiplisStatus.Instance.EnvironmentInfo.SelectMode == ContentCategoly.matome)
     {
         DequeueKey(ref LastNewsQ.MatomeList, DATAKEY);
     }
     else if (LiplisStatus.Instance.EnvironmentInfo.SelectMode == ContentCategoly.retweet)
     {
         DequeueKey(ref LastNewsQ.ReTweetList, DATAKEY);
     }
     else if (LiplisStatus.Instance.EnvironmentInfo.SelectMode == ContentCategoly.hotPicture)
     {
         DequeueKey(ref LastNewsQ.PictureList, DATAKEY);
     }
     else if (LiplisStatus.Instance.EnvironmentInfo.SelectMode == ContentCategoly.hotHash)
     {
         DequeueKey(ref LastNewsQ.HashList, DATAKEY);
     }
 }
예제 #11
0
 /// <summary>
 /// モード変更
 /// </summary>
 private void ChangeMode(ContentCategoly nextContent)
 {
     TxtTalkMode.text = ContentCategolyText.GetContentText(nextContent);
     LiplisStatus.Instance.EnvironmentInfo.SelectMode = nextContent;
 }
 /// <summary>
 /// コンストラクター
 /// </summary>
 public DatEnvironmentInfomation()
 {
     this.ScreanHeight = Screen.height;
     this.ScreanWidth  = Screen.width;
     this.SelectMode   = 0;
 }