|
@@ -29,14 +29,18 @@ namespace GFGGame
|
|
|
// _comModel = UI_ComModel.Proxy(_com);
|
|
|
_curTime = _turnTime;
|
|
|
_luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(luckyBoxId);
|
|
|
+ _com.GetChild("loaMask").asLoader.url = ResPathUtil.GetBgImgPath(_luckyBoxCfg.bgResArr[_bgIndex]);
|
|
|
ChangeRes();
|
|
|
Timers.inst.Remove(UpdateTime);
|
|
|
- Timers.inst.Add(_turnTime, 0, UpdateTime);
|
|
|
+ if (_luckyBoxCfg.resArr.Length > 1 || _luckyBoxCfg.suitIdArr.Length > 1)
|
|
|
+ {
|
|
|
+ Timers.inst.Add(_turnTime, 0, UpdateTime);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private void UpdateTime(object param)
|
|
|
{
|
|
|
-
|
|
|
+ _com.GetChild("loaMask").asLoader.url = ResPathUtil.GetBgImgPath(_luckyBoxCfg.bgResArr[_bgIndex]);
|
|
|
_bgIndex = _bgIndex + 1 == _luckyBoxCfg.bgResArr.Length ? 0 : _bgIndex + 1;
|
|
|
if (_luckyBoxCfg.resArr.Length > 0)
|
|
|
{
|
|
@@ -46,7 +50,9 @@ namespace GFGGame
|
|
|
{
|
|
|
_modelIndex = _modelIndex + 1 == _luckyBoxCfg.suitIdArr.Length ? 0 : _modelIndex + 1;
|
|
|
}
|
|
|
- ChangeRes();
|
|
|
+
|
|
|
+ _com.GetTransition("t0").Play(ChangeRes);
|
|
|
+ // ChangeRes();
|
|
|
}
|
|
|
|
|
|
private void ChangeRes()
|
|
@@ -86,6 +92,8 @@ namespace GFGGame
|
|
|
_comModel.m_holder.SetPosition(_luckyBoxCfg.posArr[_modelIndex][0], _luckyBoxCfg.posArr[_modelIndex][1], 1);
|
|
|
}
|
|
|
}
|
|
|
+ _comModel.m_t1.Play();
|
|
|
+ // _com.GetTransition("t1").Play();
|
|
|
UI_ComModel.ProxyEnd();
|
|
|
}
|
|
|
public void OnHide()
|