Exemple #1
0
    private IEnumerator Routine_NoticeEnter(eNoticeType NoticeType)
    {
        RectTransform background = null;

        if (NoticeType == eNoticeType.Challenge)
        {
            background = _NoticeBackGround;
        }
        else if (NoticeType == eNoticeType.Item)
        {
            background = _ItemNoticeBackGround;
        }

        var     deltaSize    = Vector2.Scale(background.sizeDelta, new Vector2(background.lossyScale.x, background.lossyScale.y));
        var     HidePosition = new Vector3(_ViewPosition.x, background.sizeDelta.x * 0.6f, _ViewPosition.z);
        Vector3 b1;

        background.anchoredPosition = HidePosition;

        for (float t = 0.0f; t < _ToEnterSeconds; t += Time.deltaTime)
        {
            float e = t / _ToEnterSeconds;
            b1 = Vector3.Lerp(HidePosition, _ViewPosition, e);
            background.anchoredPosition = Vector3.Lerp(b1, _ViewPosition, e);

            yield return(null);
        }
        background.anchoredPosition = _ViewPosition;
    }
 public GameObjectType(GameObject obj, eNoticeType type)
 {
     Type = type;
     Obj  = obj;
 }
Exemple #3
0
 public void AddNotice(string str, eNoticeType NoticeType)
 {
     _Notices.Add(new KeyValuePair <string, eNoticeType>(str, NoticeType));
 }
 public NoticeData(eNoticeType type, int iconId, string content)
 {
     Type    = type;
     IconId  = iconId;
     Content = content;
 }