public void CloseProgressInQuestMsgBox() { if (questMsgBox != null) { GameObject.Destroy(questMsgBox.gameObject); questMsgBox = null; } }
public void ShowProgressInQuestMsgBox(float _visivleTime = 8.0f) { if (questMsgBox != null) questMsgBox.CloseMsgBox(); if (AsGameMain.s_gameState != GAME_STATE.STATE_INGAME) return; if (AsHudDlgMgr.Instance.questBtn.gameObject.activeSelf == false) return; List<int> progressInQuestList = ArkQuestmanager.instance.GetProgressQuestIDList(); if (progressInQuestList.Count <= 0) return; GameObject balloonPrefab = ResourceLoad.LoadGameObject("UI/Optimization/Prefab/GUI_Balloon_QuestState"); GameObject objectBallonMsg = GameObject.Instantiate(balloonPrefab) as GameObject; questMsgBox = objectBallonMsg.GetComponent<AsDlgBalloonMsgBoxQuest>(); questMsgBox.tailType = AsDlgBalloonMsgBox.TailType.CENTER; questMsgBox.visibleTime = _visivleTime; questMsgBox.Init(); questMsgBox.UpdateText(); questMsgBox.transform.parent = AsHudDlgMgr.Instance.questBtn.transform; questMsgBox.transform.localPosition = new Vector3(-AsHudDlgMgr.Instance.questBtn.width * 0.25f, -AsHudDlgMgr.Instance.questBtn.height, 6.0f); }