|
@@ -48,39 +48,39 @@ namespace GFGGame
|
|
if (_luckyBoxCfg.resArr.Length > 1 || _luckyBoxCfg.suitShowArr.Length > 1)
|
|
if (_luckyBoxCfg.resArr.Length > 1 || _luckyBoxCfg.suitShowArr.Length > 1)
|
|
{
|
|
{
|
|
Timers.inst.Remove(UpdateTime);
|
|
Timers.inst.Remove(UpdateTime);
|
|
- Timers.inst.Add(1, 0, UpdateTime);
|
|
|
|
|
|
+ Timers.inst.Add(_turnTime, 0, UpdateTime);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
private void UpdateTime(object param)
|
|
private void UpdateTime(object param)
|
|
{
|
|
{
|
|
- _curTime = _curTime - 1 == 0 ? _turnTime : _curTime - 1;
|
|
|
|
|
|
+ // _curTime = _curTime - 1 == 0 ? _turnTime : _curTime - 1;
|
|
|
|
|
|
- if (_curTime == _turnTime)
|
|
|
|
|
|
+ // if (_curTime == _turnTime)
|
|
|
|
+ // {
|
|
|
|
+ _bgIndex = _bgIndex + 1 == _luckyBoxCfg.resArr.Length ? 0 : _bgIndex + 1;
|
|
|
|
+ _modelIndex = _modelIndex + 1 == _luckyBoxCfg.suitShowArr.Length ? 0 : _modelIndex + 1;
|
|
|
|
+ if (_luckyBoxCfg.resArr.Length > 1)
|
|
{
|
|
{
|
|
- _bgIndex = _bgIndex + 1 == _luckyBoxCfg.resArr.Length ? 0 : _bgIndex + 1;
|
|
|
|
- _modelIndex = _modelIndex + 1 == _luckyBoxCfg.suitShowArr.Length ? 0 : _modelIndex + 1;
|
|
|
|
- if (_luckyBoxCfg.resArr.Length > 1)
|
|
|
|
- {
|
|
|
|
- _comModel.m_loaBg.url = ResPathUtil.GetBgImgPath(_luckyBoxCfg.resArr[_bgIndex]);
|
|
|
|
|
|
+ _comModel.m_loaBg.url = ResPathUtil.GetBgImgPath(_luckyBoxCfg.resArr[_bgIndex]);
|
|
|
|
|
|
- }
|
|
|
|
- if (_luckyBoxCfg.suitShowArr.Length > 0)
|
|
|
|
|
|
+ }
|
|
|
|
+ if (_luckyBoxCfg.suitShowArr.Length > 0)
|
|
|
|
+ {
|
|
|
|
+ int scale = 100;
|
|
|
|
+ int direction = 1;
|
|
|
|
+ if (_luckyBoxCfg.scaleArr.Length > 0)
|
|
{
|
|
{
|
|
- int scale = 100;
|
|
|
|
- int direction = 1;
|
|
|
|
- if (_luckyBoxCfg.scaleArr.Length > 0)
|
|
|
|
- {
|
|
|
|
- scale = Math.Abs(_luckyBoxCfg.scaleArr[_modelIndex]);
|
|
|
|
- direction = _luckyBoxCfg.scaleArr[_modelIndex] >= 0 ? 1 : -1;
|
|
|
|
- }
|
|
|
|
- _dressUpObjUI.ResetSceneObj(scale, false, false, null, false);
|
|
|
|
- _dressUpObjUI.dressUpObj.PutOnSuitCfg(_luckyBoxCfg.suitShowArr[_modelIndex][0], true, new int[] { ConstDressUpItemType.BEI_JING }, false, false);
|
|
|
|
- _dressUpObjUI.UpdateWrapper(_comModel.m_holder);
|
|
|
|
- _dressUpObjUI.sceneObject.transform.localPosition = new Vector3(_luckyBoxCfg.suitShowArr[_modelIndex][1], _luckyBoxCfg.suitShowArr[_modelIndex][2], 0);
|
|
|
|
- _dressUpObjUI.sceneObject.transform.localScale = new Vector3(direction * scale, scale, scale);
|
|
|
|
|
|
+ scale = Math.Abs(_luckyBoxCfg.scaleArr[_modelIndex]);
|
|
|
|
+ direction = _luckyBoxCfg.scaleArr[_modelIndex] >= 0 ? 1 : -1;
|
|
}
|
|
}
|
|
|
|
+ _dressUpObjUI.ResetSceneObj(scale, false, false, null, false);
|
|
|
|
+ _dressUpObjUI.dressUpObj.PutOnSuitCfg(_luckyBoxCfg.suitShowArr[_modelIndex][0], true, new int[] { ConstDressUpItemType.BEI_JING }, false, false);
|
|
|
|
+ _dressUpObjUI.UpdateWrapper(_comModel.m_holder);
|
|
|
|
+ _dressUpObjUI.sceneObject.transform.localPosition = new Vector3(_luckyBoxCfg.suitShowArr[_modelIndex][1], _luckyBoxCfg.suitShowArr[_modelIndex][2], 0);
|
|
|
|
+ _dressUpObjUI.sceneObject.transform.localScale = new Vector3(direction * scale, scale, scale);
|
|
}
|
|
}
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
|
|
|
|
public void OnHide()
|
|
public void OnHide()
|