Ejemplo n.º 1
0
    /// <summary>
    /// UIを生成する
    /// </summary>
    /// <param name="log"></param>
    /// <returns></returns>
    public IEnumerator CreateLogUi(MsgTalkLog log)
    {
        //ウインドウのプレハブからインスタンス生成
        GameObject panel = Instantiate(this.PrefabLogNewsContent) as GameObject;

        //ウインドウ名設定
        panel.name = "LiplisLog" + log.DATAKEY;

        //要素取得
        Text     TxtTitle     = panel.transform.Find("TxtTitle").GetComponent <Text>();
        Text     TxtCat       = panel.transform.Find("TxtCat").GetComponent <Text>();
        Text     TxtTime      = panel.transform.Find("TxtTime").GetComponent <Text>();
        Text     TxtDataKey   = panel.transform.Find("TxtDataKey").GetComponent <Text>();
        Text     TxtPanelKey  = panel.transform.Find("TxtPanelKey").GetComponent <Text>();
        Button   BtnWeb       = panel.transform.Find("BtnWeb").GetComponent <Button>();
        RawImage ImgThumbnail = panel.transform.Find("ImgThumbnail").GetComponent <RawImage>();

        //内容設定
        TxtTitle.text    = log.TITLE;
        TxtCat.text      = ContentCategolyText.GetContentText(log.DATA_TYPE);
        TxtTime.text     = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss");
        TxtDataKey.text  = log.DATAKEY;
        TxtPanelKey.text = log.PANEL_KEY + DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss");


        //ポインターダウンイベントトリガー生成
        RegisterEventOpenDescription(log, ImgThumbnail.gameObject, panel);
        BtnWeb.GetComponent <Button>().onClick.AddListener(() => OpneWeb(log.URL));

        //イメージのロード
        CreateEmpty();
        GlobalCoroutine.GoWWW(ImgThumbnail, empty, log.THUMBNAIL_URL);

        yield return(panel);
    }
Ejemplo n.º 2
0
 /////////////////////////////////////////////////////////////////////////////////////////////////
 /// <summary>
 /// Create this instance.
 /// </summary>
 /////////////////////////////////////////////////////////////////////////////////////////////////
 public static Coroutine Create()
 {
     if (instance != null)
     {
         return(null);
     }
     return(GlobalCoroutine.Run(create()));
 }
Ejemplo n.º 3
0
        public virtual void ShowForce()
        {
            show = true;

            if (_coroutineBase != null)
            {
                GlobalCoroutine.Stop(_coroutineBase);
            }
            _coroutineBase = GlobalCoroutine.Run(ShowCoroutine());
        }
Ejemplo n.º 4
0
    public void Release(bool destroy = false)
    {
        m_dic.Clear();
        m_delayTodo = null;

        if (destroy)
        {
            _instance = null;
        }
    }
Ejemplo n.º 5
0
    /////////////////////////////////////////////////////////////////////////////////////////////////
    /// <summary>
    /// Run the specified routine.
    /// </summary>
    /// <param name="routine">Routine.</param>
    /////////////////////////////////////////////////////////////////////////////////////////////////
    public static Coroutine Run(IEnumerator routine)
    {
        // check and create GameObject.
        if (instance == null)
        {
            GameObject obj = new GameObject();
            obj.name = "GlobalCoroutine";
            instance = obj.AddComponent <GlobalCoroutine>();
            DontDestroyOnLoad(obj);
        }

        return(instance.StartCoroutine(instance.routine(routine)));
    }
Ejemplo n.º 6
0
        /// <summary>
        /// 本インスタンスからセットエクスプレッションを呼ぶための目セッド
        /// </summary>
        /// <param name="ExpressionCode"></param>
        public void SetExpressionLocal(MOTION ExpressionCode)
        {
            GameObject obj = new GameObject();     // コルーチン実行用オブジェクト作成

            obj.name = "GlobalCoroutine";

            GlobalCoroutine component = obj.AddComponent <GlobalCoroutine>();

            if (component != null)
            {
                component.StartCoroutine(SetExpression(ExpressionCode));
            }
        }
Ejemplo n.º 7
0
    public static void Go(IEnumerator coroutine, float time = 0f)
    {
        // コルーチン実行用オブジェクト作成
        GameObject obj = new GameObject();

        obj.name = "GlobalCoroutine";

        GlobalCoroutine component = obj.AddComponent <GlobalCoroutine>();

        if (component != null)
        {
            component.StartCoroutine(component.Do(coroutine, time));
        }
    }
Ejemplo n.º 8
0
        public virtual void Hide()
        {
            if (!show)
            {
                return;
            }

            show = false;

            if (_coroutineBase != null)
            {
                GlobalCoroutine.Stop(_coroutineBase);
            }
            _coroutineBase = GlobalCoroutine.Run(HideCoroutine());
        }
Ejemplo n.º 9
0
 /// <summary>
 /// 本インスタンスからセットエクスプレッションを呼ぶための目セッド
 /// </summary>
 /// <param name="ExpressionCode"></param>
 public void SetExpressionLocal(MOTION ExpressionCode)
 {
     GlobalCoroutine.Go(SetExpression(ExpressionCode));
 }