public void Initial() { _chatBulletScreenController = transform.parent.parent.GetComponent <ChatBulletScreenController>(); _thisRect = GetComponent <RectTransform>(); _showText = GetComponent <Text>(); _isInitial = true; }
/// <summary> /// 开关聊天弹幕 /// </summary> /// <param name="isOpne"></param> public static async void OpenBulletScreenOnOff(bool isOpne) { if (_chatBulletScreenController == null) { GameObject obj = await UIComponent.CreateUIAsync(UIType.ChatBulletScreen); _chatBulletScreenController = obj.GetComponent <ChatBulletScreenController>(); } _chatBulletScreenController.OpenShow(isOpne); //if (isOpne) //{ // await UIComponent.CreateUIAsync(UIType.ChatBulletScreen); //} //else //{ // UIComponent.HideUI(UIType.ChatBulletScreen); //} }