Merge branch 'develop' into feature/UI更新
This commit is contained in:
@@ -120,7 +120,7 @@ namespace AibisDream.UI
|
||||
/// 显示物体
|
||||
/// </summary>
|
||||
/// <returns>协程</returns>
|
||||
public IEnumerator ShowObj(string picName)
|
||||
public IEnumerator ShowObj(string picName, float duration = 1)
|
||||
{
|
||||
_showObjPanel.gameObject.SetActive(true);
|
||||
|
||||
@@ -151,16 +151,16 @@ namespace AibisDream.UI
|
||||
|
||||
// 淡入
|
||||
_showObjImage.sprite = newSprite;
|
||||
yield return _showObjImage.FadeInAsync(1);
|
||||
yield return _showObjImage.FadeInAsync(duration);
|
||||
}
|
||||
|
||||
public IEnumerator HideObj()
|
||||
public IEnumerator HideObj(float duration = 1)
|
||||
{
|
||||
yield return _showObjImage.FadeOutAsync(1);
|
||||
yield return _showObjImage.FadeOutAsync(duration);
|
||||
_showObjPanel.SetActive(false);
|
||||
}
|
||||
|
||||
public IEnumerator ShowFullScreen(string picName)
|
||||
public IEnumerator ShowFullScreen(string picName, float duration = 1)
|
||||
{
|
||||
var key = string.Format(ObjSpritePath, NormalizeObjPicName(picName));
|
||||
var handle = ResourceSystem.LoadAsync<Sprite>(key);
|
||||
@@ -174,12 +174,12 @@ namespace AibisDream.UI
|
||||
_fullScreenImage.sprite = handle.Result;
|
||||
|
||||
// 淡入
|
||||
yield return _fullScreenImage.FadeInAsync(1);
|
||||
yield return _fullScreenImage.FadeInAsync(duration);
|
||||
}
|
||||
|
||||
public IEnumerator HideFullScreen()
|
||||
public IEnumerator HideFullScreen(float duration = 1)
|
||||
{
|
||||
return _fullScreenImage.FadeOutAsync(1);
|
||||
yield return _fullScreenImage.FadeOutAsync(duration);
|
||||
}
|
||||
|
||||
public IEnumerator OpenProgressWindow(string title, string description, float duration)
|
||||
|
||||
Reference in New Issue
Block a user