2023-09-13 15:04:19 +08:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using DG.Tweening;
|
2023-09-18 00:01:05 +08:00
|
|
|
|
using DragonSoul.Shared;
|
2023-09-13 15:04:19 +08:00
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
namespace UnityTest.ZXL
|
|
|
|
|
{
|
|
|
|
|
//章节
|
2023-09-13 15:31:44 +08:00
|
|
|
|
public class ChapterUI : UI
|
2023-09-13 15:04:19 +08:00
|
|
|
|
{
|
|
|
|
|
public List<GameObject> images = new List<GameObject>();
|
|
|
|
|
public Image blackImage;
|
|
|
|
|
|
|
|
|
|
private void ShowChapter(int index)
|
|
|
|
|
{
|
|
|
|
|
HideAll();
|
|
|
|
|
images[index].SetActive(true);
|
2023-10-05 02:31:29 +08:00
|
|
|
|
blackImage.color = new Color(0, 0, 0, 0);
|
2023-09-13 15:04:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void HideAll()
|
|
|
|
|
{
|
|
|
|
|
foreach (var image in images)
|
|
|
|
|
{
|
|
|
|
|
image.SetActive(false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-18 00:01:05 +08:00
|
|
|
|
public async ETTask Transit(int index)
|
2023-09-13 15:04:19 +08:00
|
|
|
|
{
|
|
|
|
|
ShowChapter(index);
|
|
|
|
|
|
2023-09-18 00:01:05 +08:00
|
|
|
|
await ETTaskHelper.WaitTime(1);
|
2023-09-13 15:04:19 +08:00
|
|
|
|
|
2023-10-05 02:31:29 +08:00
|
|
|
|
blackImage.DOColor(new Color(0, 0, 0, 1), 1);
|
2023-09-18 00:01:05 +08:00
|
|
|
|
await ETTaskHelper.WaitTime(1);
|
2023-09-13 15:04:19 +08:00
|
|
|
|
|
|
|
|
|
// 加载后面的内容
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|