联机功能
This commit is contained in:
parent
781131458c
commit
cc73377572
@ -1096,6 +1096,7 @@ RectTransform:
|
||||
- {fileID: 7747992246884234094}
|
||||
- {fileID: 892967444314090222}
|
||||
- {fileID: 3956951239660659384}
|
||||
- {fileID: 2761173188244930348}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
@ -1201,6 +1202,7 @@ MonoBehaviour:
|
||||
SLButton: {fileID: 7677067879999997292}
|
||||
RankingButton: {fileID: 4649407183905496781}
|
||||
WikiButton: {fileID: 5879810144992425802}
|
||||
ChatAreaRoot: {fileID: 2761173188244930348}
|
||||
QuitPanel: {fileID: 7159509067703284630}
|
||||
NextTurnConfirmPanel: {fileID: 3395910451510361722}
|
||||
_tabUnitCount: 0
|
||||
@ -2872,6 +2874,41 @@ MonoBehaviour:
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &5526908458706181897
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2761173188244930348}
|
||||
m_Layer: 5
|
||||
m_Name: ChatAreaRoot
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2761173188244930348
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5526908458706181897}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7448979660496629192}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -131, y: -463}
|
||||
m_SizeDelta: {x: 638.9909, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &5922093555231887896
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@ -194,7 +194,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -671.3968, y: 408.8651}
|
||||
m_AnchoredPosition: {x: -646, y: 379}
|
||||
m_SizeDelta: {x: 577.2065, y: 97.9193}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &2440790000169401958
|
||||
@ -331,6 +331,7 @@ MonoBehaviour:
|
||||
NetInfo: {fileID: 7448979660496629192}
|
||||
ScrollViewRect: {fileID: 7039295970119204888}
|
||||
ChatAreaRoot: {fileID: 7448979660496629192}
|
||||
NetErrorPanelRoot: {fileID: 0}
|
||||
--- !u!1 &3830065821644900243
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@ -44,6 +44,7 @@ namespace TH1_UI.View.Bottom
|
||||
public Button SLButton;
|
||||
public Button RankingButton;
|
||||
public Button WikiButton;
|
||||
public RectTransform ChatAreaRoot;
|
||||
|
||||
public UIBottomBottomBarQuitPanelMono QuitPanel;
|
||||
public UIBottomBottomBarNextTurnConfirmPanelMono NextTurnConfirmPanel;
|
||||
|
||||
@ -11,6 +11,7 @@ using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using RuntimeData;
|
||||
using TH1_Logic.Core;
|
||||
using TH1_UI.Core;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace TH1_UI.View.Bottom
|
||||
@ -182,7 +183,7 @@ namespace TH1_UI.View.Bottom
|
||||
return;
|
||||
}
|
||||
|
||||
var parent = ChatAreaRoot != null ? ChatAreaRoot : transform as RectTransform;
|
||||
var parent = GetChatAreaRoot();
|
||||
_chatAreaGo = Instantiate(prefab, parent);
|
||||
FitToRoot(_chatAreaGo.transform as RectTransform, parent);
|
||||
_chatArea = _chatAreaGo.GetComponent<UIChatAreaMono>();
|
||||
@ -209,6 +210,13 @@ namespace TH1_UI.View.Bottom
|
||||
rectTransform.localScale = Vector3.one;
|
||||
}
|
||||
|
||||
private RectTransform GetChatAreaRoot()
|
||||
{
|
||||
var bottomBarRoot = ViewControllerManager.UIBottomBottomBarController?.WindowScript?.ChatAreaRoot;
|
||||
if (bottomBarRoot != null) return bottomBarRoot;
|
||||
return ChatAreaRoot != null ? ChatAreaRoot : transform as RectTransform;
|
||||
}
|
||||
|
||||
private void CloseChatArea()
|
||||
{
|
||||
if (_chatArea != null)
|
||||
@ -262,7 +270,7 @@ namespace TH1_UI.View.Bottom
|
||||
return NetErrorPanelRoot;
|
||||
}
|
||||
|
||||
return ChatAreaRoot != null ? ChatAreaRoot : transform as RectTransform;
|
||||
return GetChatAreaRoot();
|
||||
}
|
||||
|
||||
private void CloseNetErrorArea()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user