|
@@ -38,6 +38,7 @@ public class TopBarView : JCUnityLib.ViewBase
|
|
|
diamond.localPosition += Vector3.right * 87;
|
|
diamond.localPosition += Vector3.right * 87;
|
|
|
transform.Find("TopBar/IconLebo").gameObject.SetActive(false);
|
|
transform.Find("TopBar/IconLebo").gameObject.SetActive(false);
|
|
|
}
|
|
}
|
|
|
|
|
+ CheckNeewShowDiamond();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void Update()
|
|
void Update()
|
|
@@ -56,15 +57,32 @@ public class TopBarView : JCUnityLib.ViewBase
|
|
|
// }
|
|
// }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ void CheckNeewShowDiamond()
|
|
|
|
|
+ {
|
|
|
|
|
+ bool hasTarget = false;
|
|
|
|
|
+ foreach (var item in _needShowItLockers)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (typeof(ShopView) == item.GetType())
|
|
|
|
|
+ {
|
|
|
|
|
+ hasTarget = true;
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ try {
|
|
|
|
|
+ transform.Find("TopBar/Item").gameObject.SetActive(hasTarget);
|
|
|
|
|
+ } catch (System.Exception) {}
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
private static HashSet<ViewBase> _needShowItLockers = new HashSet<ViewBase>();
|
|
private static HashSet<ViewBase> _needShowItLockers = new HashSet<ViewBase>();
|
|
|
public static void NeedShowIt(ViewBase locker) {
|
|
public static void NeedShowIt(ViewBase locker) {
|
|
|
_needShowItLockers.Add(locker);
|
|
_needShowItLockers.Add(locker);
|
|
|
ins?.ResetSiblingIndex();
|
|
ins?.ResetSiblingIndex();
|
|
|
|
|
+ ins?.CheckNeewShowDiamond();
|
|
|
}
|
|
}
|
|
|
public static void DontNeedShowIt(ViewBase locker) {
|
|
public static void DontNeedShowIt(ViewBase locker) {
|
|
|
_needShowItLockers.Remove(locker);
|
|
_needShowItLockers.Remove(locker);
|
|
|
ins?.ResetSiblingIndex();
|
|
ins?.ResetSiblingIndex();
|
|
|
|
|
+ ins?.CheckNeewShowDiamond();
|
|
|
}
|
|
}
|
|
|
private void ResetSiblingIndex()
|
|
private void ResetSiblingIndex()
|
|
|
{
|
|
{
|