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