update sample

This commit is contained in:
hevinci
2022-11-26 15:09:12 +08:00
parent 67574bf759
commit ebc25c401d
4 changed files with 85 additions and 3 deletions
@@ -59,8 +59,6 @@ public class BattleRoom
/// </summary>
public void DestroyRoom()
{
Debug.LogWarning("DestroyRoom");
if (_musicHandle != null)
_musicHandle.Release();
@@ -31,7 +31,6 @@ internal class FsmSceneHome : IStateNode
private IEnumerator Prepare()
{
Debug.LogWarning("LoadScene Home");
yield return YooAssets.LoadSceneAsync("scene_home");
yield return UniWindow.OpenWindowAsync<UIHomeWindow>("UIHome");
yield return new WaitForSeconds(0.5f);
@@ -7,8 +7,12 @@ using UniFramework.Window;
[WindowAttribute(100, false)]
public class UIHomeWindow : UIWindow
{
private Text _version;
public override void OnCreate()
{
_version = this.transform.Find("version").GetComponent<Text>();
var loginBtn = this.transform.Find("Start").GetComponent<Button>();
loginBtn.onClick.AddListener(OnClickLoginBtn);
@@ -20,6 +24,8 @@ public class UIHomeWindow : UIWindow
}
public override void OnRefresh()
{
var package = YooAsset.YooAssets.GetAssetsPackage("DefaultPackage");
_version.text = "Ver : " + package.GetPackageVersion();
}
public override void OnUpdate()
{