PPT加载锁定
This commit is contained in:
parent
0b30c44306
commit
01f277c747
|
|
@ -24,6 +24,8 @@ public class UI_PPTForPracticePanel : BasePanel
|
|||
|
||||
public UI_SelectDevicePanel UI_SelectDevice;
|
||||
|
||||
protected bool isPPTLoading = false;
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
canvasGroup.alpha = 1f;
|
||||
|
|
@ -136,7 +138,9 @@ public class UI_PPTForPracticePanel : BasePanel
|
|||
}
|
||||
protected override void OnChangeToggle(string togglePath, bool isOn)
|
||||
{
|
||||
|
||||
base.OnChangeToggle(togglePath, isOn);
|
||||
if (isPPTLoading) return;//PPT正在加载中,不处理其他切换
|
||||
switch (togglePath)
|
||||
{
|
||||
default:
|
||||
|
|
@ -146,6 +150,7 @@ public class UI_PPTForPracticePanel : BasePanel
|
|||
{
|
||||
DestroyImmediate(child.gameObject);
|
||||
}
|
||||
isPPTLoading = true;
|
||||
// Æô¶¯Ð³ÌÒì²½¼ÓÔØPPT
|
||||
StartCoroutine(LoadPPTAsync(togglePath, textures =>
|
||||
{
|
||||
|
|
@ -181,6 +186,7 @@ public class UI_PPTForPracticePanel : BasePanel
|
|||
image.texture = texture;
|
||||
image.rectTransform.sizeDelta = new Vector2(1608, 940);
|
||||
}
|
||||
isPPTLoading = false;//完成加载
|
||||
}
|
||||
|
||||
private void DisplaySinglePage(Texture2D texture)
|
||||
|
|
|
|||
Loading…
Reference in New Issue