提交修改
This commit is contained in:
@@ -1,47 +0,0 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
|
||||
public class ModalWaitingMain : MonoBehaviour
|
||||
{
|
||||
GComponent _mainView;
|
||||
Window4 _testWin;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
UIPackage.AddPackage("UI/ModalWaiting");
|
||||
UIConfig.globalModalWaiting = "ui://ModalWaiting/GlobalModalWaiting";
|
||||
UIConfig.windowModalWaiting = "ui://ModalWaiting/WindowModalWaiting";
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
Application.targetFrameRate = 60;
|
||||
Stage.inst.onKeyDown.Add(OnKeyDown);
|
||||
|
||||
_mainView = this.GetComponent<UIPanel>().ui;
|
||||
|
||||
_testWin = new Window4();
|
||||
|
||||
_mainView.GetChild("n0").onClick.Add(() => { _testWin.Show(); });
|
||||
|
||||
StartCoroutine(WaitSomeTime());
|
||||
}
|
||||
|
||||
IEnumerator WaitSomeTime()
|
||||
{
|
||||
GRoot.inst.ShowModalWait();
|
||||
|
||||
yield return new WaitForSeconds(3);
|
||||
|
||||
GRoot.inst.CloseModalWait();
|
||||
}
|
||||
|
||||
void OnKeyDown(EventContext context)
|
||||
{
|
||||
if (context.inputEvent.keyCode == KeyCode.Escape)
|
||||
{
|
||||
Application.Quit();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 81df70f0eca40f24eb4d6448b5e3ed22
|
||||
timeCreated: 1447054712
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,20 +0,0 @@
|
||||
using FairyGUI;
|
||||
|
||||
public class Window4 : Window
|
||||
{
|
||||
public Window4()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
this.contentPane = UIPackage.CreateObject("ModalWaiting", "TestWin").asCom;
|
||||
this.contentPane.GetChild("n1").onClick.Add(OnClick);
|
||||
}
|
||||
|
||||
void OnClick()
|
||||
{
|
||||
this.ShowModalWait();
|
||||
Timers.inst.Add(3, 1, (object param) => { this.CloseModalWait(); });
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ac9ab786f60351340a5de178d7d19c0d
|
||||
timeCreated: 1447054712
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user