【bug】表现bug

iOS_release
zhangaotian 2024-07-29 16:42:11 +08:00
parent 61eaa99fa6
commit 3c9faff403
1 changed files with 10 additions and 6 deletions

View File

@ -347,7 +347,6 @@ public class BuildBoot : MonoBehaviour
//已选择节点
if (!string.IsNullOrEmpty(unlockNode))
{
var option = node.Value.GetOption(unlockNode);
node.Value.OptionDisplay(option);
}
@ -533,6 +532,7 @@ public class BuildBoot : MonoBehaviour
_curNode = null;
_curOption = null;
_newOption = null;
_curBubble = null;
UpdateBuildDisplay();
}
@ -562,7 +562,6 @@ public class BuildBoot : MonoBehaviour
if (_isChanging) return;
_isChanging = true;
_mask.SetActive(true);
_pickItem.SetActive(true);
EventManager.Instance.Send(EventManager.EventName.HideMainUI);
var optionObj = obj.transform.parent.gameObject;
var nodeName = optionObj.transform.parent.name;
@ -575,7 +574,8 @@ public class BuildBoot : MonoBehaviour
var condition = BuildManager.Instance.GetCondition(nodeName);
_buildBar.Open(node, BuildIconClick, BuildLockIconClick, CurCondition, condition);
_buildBar.PickItemDisplay(optionName);
OutlinePickItem(_curOption);
if (_curOption != null)
OutlinePickItem(_curOption);
EventManager.Instance.Send(EventManager.EventName.OpenUI);
}
@ -590,7 +590,7 @@ public class BuildBoot : MonoBehaviour
/// </summary>
private void OutlinePickItem(Option option)
{
if (option == null) return;
_pickItem.SetActive(true);
_pickItem.transform.position = option.OptionObj.transform.position;
_pickSpriteRenderer.sprite =
option.NormalObj.GetComponent<SpriteRenderer>().sprite;
@ -670,8 +670,12 @@ public class BuildBoot : MonoBehaviour
private void UnregisterClickEvent()
{
InputManager.Instance.OnBuildItemClick -= OnBuildItemClick;
InputManager.Instance.OnBuildBubbleClick -= OnBuildBubbleClick;
if (InputManager.Instance)
{
InputManager.Instance.OnBuildItemClick -= OnBuildItemClick;
InputManager.Instance.OnBuildBubbleClick -= OnBuildBubbleClick;
}
EventManager.Instance.Unregister(EventManager.EventName.HideBuildUI, HideUI);
EventManager.Instance.Unregister(EventManager.EventName.ShowBuildUI, ShowUI);
}