修改注册事件
This commit is contained in:
parent
7d9fc1250c
commit
57338dc352
|
@ -17,25 +17,27 @@ public class ImageTips : MonoBehaviour
|
|||
gameObject.SetActive(true);
|
||||
selfRect = GetComponent<RectTransform>();
|
||||
image = GetComponent<Image>();
|
||||
image.enabled = true;
|
||||
selfRect.SetParent(target);
|
||||
selfRect.anchorMin = Vector2.zero;
|
||||
selfRect.anchorMax = new Vector2(1, 1);
|
||||
selfRect.offsetMax = Vector2.zero;
|
||||
selfRect.offsetMin = Vector2.zero;
|
||||
//selfRect.sizeDelta = target.sizeDelta + sizeOffset;
|
||||
if (gameObject.activeSelf)
|
||||
if (gameObject.activeSelf && gameObject.activeInHierarchy)
|
||||
StartCoroutine(FlashRoutine());
|
||||
}
|
||||
|
||||
public void HideTips()
|
||||
{
|
||||
transform.parent = null;
|
||||
if (gameObject.activeSelf)
|
||||
if (gameObject.activeSelf && gameObject.activeInHierarchy)
|
||||
{
|
||||
StopCoroutine(FlashRoutine());
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator FlashRoutine()
|
||||
{
|
||||
while (true)
|
||||
|
|
|
@ -83,11 +83,8 @@ public class PermanentTriggerBase : MonoBehaviour
|
|||
{
|
||||
GameManager.EventMgr.RemoveEventListener<string>(Enum_EventType.SwitchSubProcessStepTriggerID, SwitchSubProcessStepTriggerID);
|
||||
}
|
||||
private void OnDisable()
|
||||
{
|
||||
GameManager.EventMgr.RemoveEventListener<string>(Enum_EventType.SwitchSubProcessStepTriggerID, SwitchSubProcessStepTriggerID);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//private void OnDisable()
|
||||
//{
|
||||
// GameManager.EventMgr.RemoveEventListener<string>(Enum_EventType.SwitchSubProcessStepTriggerID, SwitchSubProcessStepTriggerID);
|
||||
//}
|
||||
}
|
||||
|
|
|
@ -64,6 +64,7 @@ public class UI_ToolOrMaterialsOrDeviceItem : BaseItem
|
|||
currentTool.GetComponent<Collider>().enabled = false;
|
||||
currentTool.name = currentItem.toolName;
|
||||
LiveSceneManager.Instance.SetSpawnToolInfo(currentTool);
|
||||
GameManager.UIMgr.imageTips.HideTips();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue