王琪诚

【任务】TAPD#

功能详情
配置文件 否
提交作者 QiCheng.Wang
评审人员
... ... @@ -32,11 +32,7 @@ public class ImageViewerManager : MonoBehaviour
Instance = this;
panel.SetActive(false);
var panelBtn = panel.GetComponent<Button>();
panelBtn.onClick.AddListener(() =>
{
fullImage.sprite = null;
panel.SetActive(false);
});
panelBtn.onClick.AddListener(Hide);
}
public void ShowImage(string url,string content,string logo,string time)
... ... @@ -75,7 +71,7 @@ public class ImageViewerManager : MonoBehaviour
imageContainer.rectTransform.sizeDelta = new Vector2(width, height);
StartCoroutine(ImageLoader.LoadImage(logo, logoImage));
}));
//时间
foreach (Transform child in timeGrid)
... ... @@ -93,18 +89,16 @@ public class ImageViewerManager : MonoBehaviour
}));
}
public void Hide()
{
fullImage.sprite = null;
panel.SetActive(false);
//清空原来的时间
foreach (Transform child in timeGrid)
{
Destroy(child.gameObject);
}
}
}
\ No newline at end of file
... ...