Showing
6 changed files
with
5 additions
and
10 deletions
@@ -12,8 +12,7 @@ public class MomentList | @@ -12,8 +12,7 @@ public class MomentList | ||
12 | //封面图url | 12 | //封面图url |
13 | public String cover; | 13 | public String cover; |
14 | public String bottom; | 14 | public String bottom; |
15 | - //点赞图标 | ||
16 | - public string likeIcon; | 15 | + |
17 | 16 | ||
18 | //大图右下角的小logo | 17 | //大图右下角的小logo |
19 | public String logo; | 18 | public String logo; |
@@ -31,7 +31,6 @@ public class MomentItem : MonoBehaviour | @@ -31,7 +31,6 @@ public class MomentItem : MonoBehaviour | ||
31 | public TextMeshProUGUI from; | 31 | public TextMeshProUGUI from; |
32 | public TextMeshProUGUI time; | 32 | public TextMeshProUGUI time; |
33 | public Image likeIconImage; | 33 | public Image likeIconImage; |
34 | - private string originLikeIcon; | ||
35 | 34 | ||
36 | public Transform likeGrid; // 父对象,用于点赞emjoi排列 | 35 | public Transform likeGrid; // 父对象,用于点赞emjoi排列 |
37 | public GameObject likePrefab; // 点赞emjoi预制体 | 36 | public GameObject likePrefab; // 点赞emjoi预制体 |
@@ -77,7 +76,6 @@ public class MomentItem : MonoBehaviour | @@ -77,7 +76,6 @@ public class MomentItem : MonoBehaviour | ||
77 | bool isOver = IsUIOverlapping(checkRectTransform, scrollViewRectTransform); | 76 | bool isOver = IsUIOverlapping(checkRectTransform, scrollViewRectTransform); |
78 | if (!isOver) | 77 | if (!isOver) |
79 | { | 78 | { |
80 | - StartCoroutine(ImageLoader.LoadImage(originLikeIcon, likeIconImage)); | ||
81 | likesText.text = originLikesText; | 79 | likesText.text = originLikesText; |
82 | likeIconImage.gameObject.SetActive(true); | 80 | likeIconImage.gameObject.SetActive(true); |
83 | likedEmoji.gameObject.SetActive(false); | 81 | likedEmoji.gameObject.SetActive(false); |
@@ -131,7 +129,7 @@ public class MomentItem : MonoBehaviour | @@ -131,7 +129,7 @@ public class MomentItem : MonoBehaviour | ||
131 | 129 | ||
132 | 130 | ||
133 | 131 | ||
134 | - public int Setup(Moment moment,List<Like> likeList,string likeIcon,string logo,int momentCount) | 132 | + public int Setup(Moment moment,List<Like> likeList,string logo,int momentCount) |
135 | { | 133 | { |
136 | //计算单条朋友圈所占高度 | 134 | //计算单条朋友圈所占高度 |
137 | //每行字50 | 135 | //每行字50 |
@@ -150,8 +148,7 @@ public class MomentItem : MonoBehaviour | @@ -150,8 +148,7 @@ public class MomentItem : MonoBehaviour | ||
150 | 148 | ||
151 | from.text = moment.from; | 149 | from.text = moment.from; |
152 | time.text = moment.time; | 150 | time.text = moment.time; |
153 | - StartCoroutine(ImageLoader.LoadImage(likeIcon, likeIconImage)); | ||
154 | - originLikeIcon = likeIcon; | 151 | + |
155 | momentHeight+= line; | 152 | momentHeight+= line; |
156 | 153 | ||
157 | //单条朋友圈面板点击事件 | 154 | //单条朋友圈面板点击事件 |
@@ -41,7 +41,7 @@ public class MomentManager : MonoBehaviour | @@ -41,7 +41,7 @@ public class MomentManager : MonoBehaviour | ||
41 | { | 41 | { |
42 | GameObject item = Instantiate(momentPrefab, contentParent); | 42 | GameObject item = Instantiate(momentPrefab, contentParent); |
43 | 43 | ||
44 | - int momentHeight = item.GetComponent<MomentItem>().Setup(moment,data.likeList,data.likeIcon,data.logo,++momentCount); | 44 | + int momentHeight = item.GetComponent<MomentItem>().Setup(moment,data.likeList,data.logo,++momentCount); |
45 | 45 | ||
46 | RectTransform momentRt = item.GetComponent<RectTransform>(); | 46 | RectTransform momentRt = item.GetComponent<RectTransform>(); |
47 | momentRt.sizeDelta = new Vector2(momentRt.sizeDelta.x, momentHeight); | 47 | momentRt.sizeDelta = new Vector2(momentRt.sizeDelta.x, momentHeight); |
@@ -2,7 +2,6 @@ | @@ -2,7 +2,6 @@ | ||
2 | "cover": "https://h5.edcc.cn/FriendCircle/image/cover.png", | 2 | "cover": "https://h5.edcc.cn/FriendCircle/image/cover.png", |
3 | "bottom": "https://h5.edcc.cn/FriendCircle/image/bottom.png", | 3 | "bottom": "https://h5.edcc.cn/FriendCircle/image/bottom.png", |
4 | "logo": "https://h5.edcc.cn/FriendCircle/image/logo.png", | 4 | "logo": "https://h5.edcc.cn/FriendCircle/image/logo.png", |
5 | - "likeIcon": "https://h5.edcc.cn/FriendCircle/image/likeIcon.png?a=2", | ||
6 | "likeList":[ | 5 | "likeList":[ |
7 | { "icon": "<sprite name=\"Smile\">", "bullet": "加油加油!", "name": "Smile"}, | 6 | { "icon": "<sprite name=\"Smile\">", "bullet": "加油加油!", "name": "Smile"}, |
8 | { "icon": "<sprite name=\"LaughCry\">", "bullet": "哈哈哈哈哈", "name": "LaughCry"}, | 7 | { "icon": "<sprite name=\"LaughCry\">", "bullet": "哈哈哈哈哈", "name": "LaughCry"}, |
@@ -2235,7 +2235,7 @@ MonoBehaviour: | @@ -2235,7 +2235,7 @@ MonoBehaviour: | ||
2235 | m_OnCullStateChanged: | 2235 | m_OnCullStateChanged: |
2236 | m_PersistentCalls: | 2236 | m_PersistentCalls: |
2237 | m_Calls: [] | 2237 | m_Calls: [] |
2238 | - m_Sprite: {fileID: 0} | 2238 | + m_Sprite: {fileID: 21300000, guid: 8b4345a2f9fc6463cab99c888ff1f358, type: 3} |
2239 | m_Type: 0 | 2239 | m_Type: 0 |
2240 | m_PreserveAspect: 0 | 2240 | m_PreserveAspect: 0 |
2241 | m_FillCenter: 1 | 2241 | m_FillCenter: 1 |
-
Please register or login to post a comment