56 lines
1.5 KiB
C#
56 lines
1.5 KiB
C#
![]() |
// ***********************************************************************
|
|||
|
// Assembly : Unity
|
|||
|
// Author : Kimch
|
|||
|
// Created : 2017-11-11
|
|||
|
//
|
|||
|
// Last Modified By : Kimch
|
|||
|
// Last Modified On :
|
|||
|
// ***********************************************************************
|
|||
|
// <copyright file= "LoadWindow.View" company=""></copyright>
|
|||
|
// <summary></summary>
|
|||
|
// ***********************************************************************
|
|||
|
using TMPro;
|
|||
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
|
|||
|
namespace G.UI
|
|||
|
{
|
|||
|
partial class LoadWindow
|
|||
|
{
|
|||
|
#region Field
|
|||
|
|
|||
|
private Slider _sldProgress;
|
|||
|
private Image _imgBg;
|
|||
|
|
|||
|
private TextMeshProUGUI _tmpTips;
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Method
|
|||
|
|
|||
|
public void InitView()
|
|||
|
{
|
|||
|
_sldProgress = Find<Slider>("Panel/_sldProgress");
|
|||
|
_tmpTips = Find<TextMeshProUGUI>("Panel/_tmpTips");
|
|||
|
//_imgBg = Find<Image>("Panel/_imgBg");
|
|||
|
//if (!_imgBg.overrideSprite)
|
|||
|
// IconProxy.Instance.SetSpriteAsync(_imgBg, "login_bg[login_bg]");
|
|||
|
}
|
|||
|
|
|||
|
public void RefreshView()
|
|||
|
{
|
|||
|
_sldProgress.value = 0f;
|
|||
|
|
|||
|
_tmpTips.text = "游戏小提示:" + KLocalization.GetLocalString(Random.Range(150000, 150006));
|
|||
|
}
|
|||
|
|
|||
|
public void UpdateView()
|
|||
|
{
|
|||
|
float progress = Mathf.Lerp(_sldProgress.value, GetProgress(), 0.2f);
|
|||
|
_sldProgress.value = progress;
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|
|||
|
}
|