|
@@ -31,7 +31,7 @@ namespace GFGGame
|
|
_curTime = _turnTime;
|
|
_curTime = _turnTime;
|
|
_luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(luckyBoxId);
|
|
_luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(luckyBoxId);
|
|
_com.GetChild("loaMask").asLoader.url = ResPathUtil.GetBgImgPath(_luckyBoxCfg.bgResArr[_bgIndex]);
|
|
_com.GetChild("loaMask").asLoader.url = ResPathUtil.GetBgImgPath(_luckyBoxCfg.bgResArr[_bgIndex]);
|
|
- UpdateRes();
|
|
|
|
|
|
+ ChangeRes();
|
|
Timers.inst.Remove(UpdateTime);
|
|
Timers.inst.Remove(UpdateTime);
|
|
if (_luckyBoxCfg.resArr.Length > 1 || _luckyBoxCfg.suitIdArr.Length > 1)
|
|
if (_luckyBoxCfg.resArr.Length > 1 || _luckyBoxCfg.suitIdArr.Length > 1)
|
|
{
|
|
{
|
|
@@ -52,14 +52,14 @@ namespace GFGGame
|
|
_modelIndex = _modelIndex + 1 == _luckyBoxCfg.suitIdArr.Length ? 0 : _modelIndex + 1;
|
|
_modelIndex = _modelIndex + 1 == _luckyBoxCfg.suitIdArr.Length ? 0 : _modelIndex + 1;
|
|
}
|
|
}
|
|
|
|
|
|
- _com.GetTransition("t0").Play(UpdateRes);
|
|
|
|
|
|
+ _com.GetTransition("t0").Play(ChangeRes);
|
|
// ChangeRes();
|
|
// ChangeRes();
|
|
}
|
|
}
|
|
- private void UpdateRes()
|
|
|
|
- {
|
|
|
|
- Timers.inst.StartCoroutine(ChangeRes());
|
|
|
|
- }
|
|
|
|
- private IEnumerator ChangeRes()
|
|
|
|
|
|
+ // private void UpdateRes()
|
|
|
|
+ // {
|
|
|
|
+ // Timers.inst.StartCoroutine(ChangeRes());
|
|
|
|
+ // }
|
|
|
|
+ private void ChangeRes()
|
|
{
|
|
{
|
|
UI_ComModel _comModel = UI_ComModel.Proxy(_com);
|
|
UI_ComModel _comModel = UI_ComModel.Proxy(_com);
|
|
_comModel.m_loaBg.url = ResPathUtil.GetBgImgPath(_luckyBoxCfg.bgResArr[_bgIndex]);
|
|
_comModel.m_loaBg.url = ResPathUtil.GetBgImgPath(_luckyBoxCfg.bgResArr[_bgIndex]);
|
|
@@ -91,14 +91,14 @@ namespace GFGGame
|
|
{
|
|
{
|
|
_comModel.m_loaRes.url = "";
|
|
_comModel.m_loaRes.url = "";
|
|
_comModel.m_loaMask.alpha = 1;
|
|
_comModel.m_loaMask.alpha = 1;
|
|
- yield return null;
|
|
|
|
|
|
+ // yield return null;
|
|
int scale = _luckyBoxCfg.scaleArr.Length > 0 ? Math.Abs(_luckyBoxCfg.scaleArr[_modelIndex]) / 10000 : 100;
|
|
int scale = _luckyBoxCfg.scaleArr.Length > 0 ? Math.Abs(_luckyBoxCfg.scaleArr[_modelIndex]) / 10000 : 100;
|
|
_dressUpObjUI.ResetSceneObj(scale, false, false, null, false);
|
|
_dressUpObjUI.ResetSceneObj(scale, false, false, null, false);
|
|
_dressUpObjUI.dressUpObj.PutOnSuitCfg(_luckyBoxCfg.suitIdArr[_modelIndex], true, new int[] { ConstDressUpItemType.BEI_JING }, false, false);
|
|
_dressUpObjUI.dressUpObj.PutOnSuitCfg(_luckyBoxCfg.suitIdArr[_modelIndex], true, new int[] { ConstDressUpItemType.BEI_JING }, false, false);
|
|
_dressUpObjUI.UpdateWrapper(_comModel.m_holder);
|
|
_dressUpObjUI.UpdateWrapper(_comModel.m_holder);
|
|
_dressUpObjUI.sceneObject.transform.localScale = new Vector3(direction * scale, scale, scale);
|
|
_dressUpObjUI.sceneObject.transform.localScale = new Vector3(direction * scale, scale, scale);
|
|
_comModel.m_holder.SetPosition(_luckyBoxCfg.posArr[_modelIndex][0], _luckyBoxCfg.posArr[_modelIndex][1], 1);
|
|
_comModel.m_holder.SetPosition(_luckyBoxCfg.posArr[_modelIndex][0], _luckyBoxCfg.posArr[_modelIndex][1], 1);
|
|
- yield return null;
|
|
|
|
|
|
+ // yield return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
_comModel.m_t1.Play();
|
|
_comModel.m_t1.Play();
|