|
@@ -29,6 +29,8 @@ namespace GFGGame
|
|
|
private bool tryGuide = false;
|
|
|
//战斗表现修改,得分和星星偏移
|
|
|
private float offsetX = 150.0f;
|
|
|
+ //部位图片
|
|
|
+ private List<string> partImage = new List<string> { "","fx","zr","sp","scw","fz","zb"};
|
|
|
|
|
|
private EffectUI _effectUI1;
|
|
|
private EffectUI _effectUI2;
|
|
@@ -155,13 +157,24 @@ namespace GFGGame
|
|
|
{
|
|
|
base.OnShown();
|
|
|
roleData = InstanceZonesDataManager.roleData;
|
|
|
- if (_sceneObject == null)
|
|
|
+ //if (_sceneObject == null)
|
|
|
+ //{
|
|
|
+ // _sceneObject = PrefabManager.Instance.InstantiateSync(ResPathUtil.GetPrefabPath("SceneFightSingleScore"));
|
|
|
+ // MyDressUpHelper.dressUpObj.setSceneObj(_sceneObject, false, false, null, true);
|
|
|
+ // MyDressUpHelper.dressUpObj.AddOrRemove(180014, false);
|
|
|
+ //}
|
|
|
+ //MyDressUpHelper.dressUpObj.PutOnItemList(roleData.itemList);
|
|
|
+
|
|
|
+ DressUpObjUI dressUpObjUI;
|
|
|
+ if (_ui.m_holder.data == null)
|
|
|
{
|
|
|
- _sceneObject = PrefabManager.Instance.InstantiateSync(ResPathUtil.GetPrefabPath("SceneFightSingleScore"));
|
|
|
- MyDressUpHelper.dressUpObj.setSceneObj(_sceneObject, false, false, null, true);
|
|
|
- MyDressUpHelper.dressUpObj.AddOrRemove(180014, false);
|
|
|
+ _ui.m_holder.data = new DressUpObjUI("SceneFightSingleScore");
|
|
|
}
|
|
|
- MyDressUpHelper.dressUpObj.PutOnItemList(roleData.itemList);
|
|
|
+ dressUpObjUI = _ui.m_holder.data as DressUpObjUI;
|
|
|
+ dressUpObjUI.ResetSceneObj(100, false, true, null, false);
|
|
|
+ dressUpObjUI.dressUpObj.PutOnItemList(roleData.itemList);
|
|
|
+ dressUpObjUI.UpdateWrapper(_ui.m_holder);
|
|
|
+ _ui.m_bg.url = ResPathUtil.GetBgImgPath("zd_g_bg");
|
|
|
|
|
|
if (!FightDataManager.Instance.autoPlay)
|
|
|
{
|
|
@@ -271,6 +284,7 @@ namespace GFGGame
|
|
|
x = pos.x;
|
|
|
y = pos.y;
|
|
|
_ui.m_comClick.m_comResult.target.visible = true;
|
|
|
+ _ui.m_comClick.m_comResult.m_holderNormal.scale = new Vector2(1.6f, 1.6f);
|
|
|
_ui.m_comClick.m_comResult.m_holderResult.SetXY(130, 130);
|
|
|
// _ui.m_comClick.m_comResult.m_loaGlass.url = string.Format("ui://Main/zd_bl_{0}", UnityEngine.Random.Range(0, 3));
|
|
|
_ui.m_comClick.m_comResult.target.SetXY(x, y);
|
|
@@ -291,7 +305,7 @@ namespace GFGGame
|
|
|
_ui.m_comClick.m_comResult.m_t0.ClearHooks();
|
|
|
_ui.m_comClick.m_comResult.m_t0.Play(OnComResultComplete);
|
|
|
}
|
|
|
- _ui.m_comClick.m_comResult.m_loaPart.url = string.Format("ui://Main/pf_picture_{0}", _partId);
|
|
|
+ _ui.m_comClick.m_comResult.m_loaPart.url = string.Format("ui://Main/zd_icon_{0}", partImage[_partId]);
|
|
|
}
|
|
|
private void OnComResultComplete()
|
|
|
{
|
|
@@ -332,6 +346,7 @@ namespace GFGGame
|
|
|
_score += _partScore;
|
|
|
_ui.m_comClick.m_comResult.target.GetChild("holder" + clickType).visible = true;
|
|
|
_ui.m_comClick.m_comResult.m_c1.selectedIndex = clickType;
|
|
|
+ _ui.m_comClick.m_comResult.m_evaluatext.url = string.Format("ui://Main/zd_wz_pf_{0}", partImage[_partId]);
|
|
|
switch (clickType)
|
|
|
{
|
|
|
case ClickType.MISS_CLICK:
|
|
@@ -473,6 +488,7 @@ namespace GFGGame
|
|
|
if (GuideDataManager.IsGuideFinish(ConstGuideId.START_FIGHT) <= 0 && !ViewManager.isViewOpen(typeof(GuideView).FullName)) return;
|
|
|
Timers.inst.Add(0.1f, 0, ComAllCirclePressTime);
|
|
|
|
|
|
+ _effectUI15.GetObj().GetComponent<Animator>().SetBool("player", true);
|
|
|
}
|
|
|
private void ComAllCirclePressTime(object param = null)
|
|
|
{
|
|
@@ -683,11 +699,18 @@ namespace GFGGame
|
|
|
protected override void OnHide()
|
|
|
{
|
|
|
base.OnHide();
|
|
|
- if (_sceneObject != null)
|
|
|
+ //if (_sceneObject != null)
|
|
|
+ //{
|
|
|
+ // PrefabManager.Instance.Restore(_sceneObject);
|
|
|
+ // _sceneObject = null;
|
|
|
+ //}
|
|
|
+
|
|
|
+ DressUpObjUI dressUpObjUI = _ui.m_holder.data as DressUpObjUI;
|
|
|
+ if (dressUpObjUI != null)
|
|
|
{
|
|
|
- PrefabManager.Instance.Restore(_sceneObject);
|
|
|
- _sceneObject = null;
|
|
|
+ dressUpObjUI.Dispose();
|
|
|
}
|
|
|
+ _ui.m_holder.data = null;
|
|
|
|
|
|
Reset();
|
|
|
Timers.inst.Remove(CheckGuide);
|