王琪诚

【任务】TAPD#

功能详情 朋友圈
配置文件 否
提交作者 QiCheng.Wang
评审人员

4.35 KB | W: | H:

3.32 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
... ... @@ -12,8 +12,7 @@ public class MomentList
//封面图url
public String cover;
public String bottom;
//点赞图标
public string likeIcon;
//大图右下角的小logo
public String logo;
... ...
... ... @@ -31,7 +31,6 @@ public class MomentItem : MonoBehaviour
public TextMeshProUGUI from;
public TextMeshProUGUI time;
public Image likeIconImage;
private string originLikeIcon;
public Transform likeGrid; // 父对象,用于点赞emjoi排列
public GameObject likePrefab; // 点赞emjoi预制体
... ... @@ -77,7 +76,6 @@ public class MomentItem : MonoBehaviour
bool isOver = IsUIOverlapping(checkRectTransform, scrollViewRectTransform);
if (!isOver)
{
StartCoroutine(ImageLoader.LoadImage(originLikeIcon, likeIconImage));
likesText.text = originLikesText;
likeIconImage.gameObject.SetActive(true);
likedEmoji.gameObject.SetActive(false);
... ... @@ -131,7 +129,7 @@ public class MomentItem : MonoBehaviour
public int Setup(Moment moment,List<Like> likeList,string likeIcon,string logo,int momentCount)
public int Setup(Moment moment,List<Like> likeList,string logo,int momentCount)
{
//计算单条朋友圈所占高度
//每行字50
... ... @@ -150,8 +148,7 @@ public class MomentItem : MonoBehaviour
from.text = moment.from;
time.text = moment.time;
StartCoroutine(ImageLoader.LoadImage(likeIcon, likeIconImage));
originLikeIcon = likeIcon;
momentHeight+= line;
//单条朋友圈面板点击事件
... ...
... ... @@ -41,7 +41,7 @@ public class MomentManager : MonoBehaviour
{
GameObject item = Instantiate(momentPrefab, contentParent);
int momentHeight = item.GetComponent<MomentItem>().Setup(moment,data.likeList,data.likeIcon,data.logo,++momentCount);
int momentHeight = item.GetComponent<MomentItem>().Setup(moment,data.likeList,data.logo,++momentCount);
RectTransform momentRt = item.GetComponent<RectTransform>();
momentRt.sizeDelta = new Vector2(momentRt.sizeDelta.x, momentHeight);
... ...
... ... @@ -2,7 +2,6 @@
"cover": "https://h5.edcc.cn/FriendCircle/image/cover.png",
"bottom": "https://h5.edcc.cn/FriendCircle/image/bottom.png",
"logo": "https://h5.edcc.cn/FriendCircle/image/logo.png",
"likeIcon": "https://h5.edcc.cn/FriendCircle/image/likeIcon.png?a=2",
"likeList":[
{ "icon": "<sprite name=\"Smile\">", "bullet": "加油加油!", "name": "Smile"},
{ "icon": "<sprite name=\"LaughCry\">", "bullet": "哈哈哈哈哈", "name": "LaughCry"},
... ...
... ... @@ -2235,7 +2235,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Sprite: {fileID: 21300000, guid: 8b4345a2f9fc6463cab99c888ff1f358, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
... ...