联机修复
This commit is contained in:
parent
7a2b79afc8
commit
211a626e63
@ -13338,8 +13338,8 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 333.33514, y: -28}
|
||||
m_SizeDelta: {x: 273, y: 33.333008}
|
||||
m_AnchoredPosition: {x: 467.7184, y: -27.833}
|
||||
m_SizeDelta: {x: 541.7667, y: 33}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5147197837823694364
|
||||
CanvasRenderer:
|
||||
@ -13369,7 +13369,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: "\u76EE\u524D\u4EC5\u652F\u63012\u4EBA\u8054\u673A"
|
||||
m_text: "\u76EE\u524D\u4EC5\u652F\u63012\u4EBA\u8054\u673A\uFF0C\u5B88\u77E2\u5E1D\u56FD\u5C06\u5728\u540E\u7EED\u7248\u672C\u5F00\u653E"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: f74d73acde897024090a352531df919f, type: 2}
|
||||
m_sharedMaterial: {fileID: -5194638153132371293, guid: f74d73acde897024090a352531df919f, type: 2}
|
||||
|
||||
@ -81299,14 +81299,14 @@ RectTransform:
|
||||
- {fileID: 1855904089}
|
||||
- {fileID: 331656602}
|
||||
- {fileID: 1499670940}
|
||||
- {fileID: 1043595294}
|
||||
- {fileID: 1732251058}
|
||||
- {fileID: 1082107953}
|
||||
- {fileID: 848193244}
|
||||
- {fileID: 167019286}
|
||||
- {fileID: 1941701034}
|
||||
- {fileID: 1181852328}
|
||||
- {fileID: 932301959}
|
||||
- {fileID: 1043595294}
|
||||
- {fileID: 1732251058}
|
||||
- {fileID: 1062265646}
|
||||
- {fileID: 1957837102}
|
||||
- {fileID: 6478801474481404213}
|
||||
|
||||
@ -84,19 +84,9 @@ namespace Logic
|
||||
//Debug.Log($"BusyType is {PresentationManager.BusyType}");
|
||||
return;
|
||||
}
|
||||
// 检测数字键1-9的按下,执行对应的操作
|
||||
if (UIManager.Instance.UIInfoManager.GetCurTaskType() == typeof(UIInfoGridInfoController))
|
||||
{
|
||||
for (int i = 1; i <= 9; i++)
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Alpha1 + i - 1))
|
||||
{
|
||||
EventManager.Publish(new ExecuteUIInfoGridInfo(){idx = (uint)(i - 1)});
|
||||
//UIManager.Instance.BottomInfoUI.ExecuteActionButtonByIndex(i - 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
OnGridInfoAction();
|
||||
|
||||
|
||||
if (UIBlockCameraDrag.DownUpEvent) // 检测鼠标点击
|
||||
{
|
||||
@ -111,12 +101,8 @@ namespace Logic
|
||||
// 根据点击的地形类型执行某些操作(例如,显示消息)
|
||||
_main.MapInteractionLogic.OnTileClicked(Main.MapData,clickedTerrain);
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.E))
|
||||
{
|
||||
EventManager.Publish(new ExecuteUIBottomBottomBarNextButtonClick());
|
||||
//SimulateButtonClick(UIManager.Instance.BottomBarUI.NextTurnButton);
|
||||
}
|
||||
|
||||
OnBottomBarNextButton();
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.BackQuote))
|
||||
{
|
||||
@ -138,55 +124,12 @@ namespace Logic
|
||||
DebugCenter.Instance.DebugHideCenterMessage = !DebugCenter.Instance.DebugHideCenterMessage;
|
||||
#endif
|
||||
}
|
||||
|
||||
OnTechTreeAction();
|
||||
|
||||
OnHeroAction();
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.T))
|
||||
{
|
||||
if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift))
|
||||
{
|
||||
#if UNITY_EDITOR || USE_INPUT
|
||||
Main.MapData.PlayerMap.SelfPlayerData.PlayerWealth += 1000;
|
||||
Table.Instance.PlayerDataAssets.GetPlayerInfo(Main.MapData.PlayerMap.SelfPlayerData, out var info);
|
||||
foreach (TechType techType in info.TechPool)
|
||||
Main.PlayerLogic.ResearchTech(Main.MapData, Main.MapData.PlayerMap.SelfPlayerData,techType,0);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
if(UIManager.Instance.UIInfoManager.GetCurTaskType() == typeof(UIInfoTechTreeController))
|
||||
EventManager.Publish(new HideUIInfoTechTree(){non = 0});
|
||||
else
|
||||
EventManager.Publish(new ShowUIInfoTechTree(){non = 0});
|
||||
/*
|
||||
if (UIManager.Instance.TechTreeUI.ROTechTreeUI.activeSelf)
|
||||
{
|
||||
UIManager.Instance.TechTreeUI.SetTechTreeShowHide(false);
|
||||
UIManager.Instance.BottomBarUI.SetBottomBarShowHide(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIManager.Instance.TechTreeUI.SetTechTreeShowHide(true);
|
||||
UIManager.Instance.BottomBarUI.SetBottomBarShowHide(false);
|
||||
UIManager.Instance.BottomInfoUI.SetBottomInfoHide();
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.C))
|
||||
{
|
||||
if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift))
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if(UIManager.Instance.UIInfoManager.GetCurTaskType() == typeof(UIInfoHeroController))
|
||||
EventManager.Publish(new HideUIInfoHero(){non = 0});
|
||||
else
|
||||
EventManager.Publish(new ShowUIInfoHero(){non = 0});
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if (Input.GetKeyDown(KeyCode.Q))
|
||||
{
|
||||
if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift))
|
||||
@ -198,7 +141,7 @@ namespace Logic
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
//这里处理WASD移动
|
||||
@ -257,6 +200,90 @@ namespace Logic
|
||||
ExecuteEvents.Execute(go, pointer, ExecuteEvents.pointerUpHandler);
|
||||
button.onClick.Invoke();
|
||||
}
|
||||
|
||||
private void OnGridInfoAction()
|
||||
{
|
||||
if (Main.MapData.CurPlayer != Main.MapData.PlayerMap.SelfPlayerData) return;
|
||||
// 检测数字键1-9的按下,执行对应的操作
|
||||
if (UIManager.Instance.UIInfoManager.GetCurTaskType() != typeof(UIInfoGridInfoController)) return;
|
||||
for (int i = 1; i <= 9; i++)
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Alpha1 + i - 1))
|
||||
{
|
||||
EventManager.Publish(new ExecuteUIInfoGridInfo(){idx = (uint)(i - 1)});
|
||||
//UIManager.Instance.BottomInfoUI.ExecuteActionButtonByIndex(i - 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void OnBottomBarNextButton()
|
||||
{
|
||||
// 检测E的按下,执行对应的操作
|
||||
if (Main.MapData.CurPlayer != Main.MapData.PlayerMap.SelfPlayerData) return;
|
||||
if (Input.GetKeyDown(KeyCode.E))
|
||||
{
|
||||
EventManager.Publish(new ExecuteUIBottomBottomBarNextButtonClick());
|
||||
//SimulateButtonClick(UIManager.Instance.BottomBarUI.NextTurnButton);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTechTreeAction()
|
||||
{
|
||||
if (Main.MapData.CurPlayer != Main.MapData.PlayerMap.SelfPlayerData) return;
|
||||
if (Input.GetKeyDown(KeyCode.T))
|
||||
{
|
||||
if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift))
|
||||
{
|
||||
#if UNITY_EDITOR || USE_INPUT
|
||||
Main.MapData.PlayerMap.SelfPlayerData.PlayerWealth += 1000;
|
||||
Table.Instance.PlayerDataAssets.GetPlayerInfo(Main.MapData.PlayerMap.SelfPlayerData, out var info);
|
||||
foreach (TechType techType in info.TechPool)
|
||||
Main.PlayerLogic.ResearchTech(Main.MapData, Main.MapData.PlayerMap.SelfPlayerData,techType,0);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
if(UIManager.Instance.UIInfoManager.GetCurTaskType() == typeof(UIInfoTechTreeController))
|
||||
EventManager.Publish(new HideUIInfoTechTree(){non = 0});
|
||||
else
|
||||
EventManager.Publish(new ShowUIInfoTechTree(){non = 0});
|
||||
/*
|
||||
if (UIManager.Instance.TechTreeUI.ROTechTreeUI.activeSelf)
|
||||
{
|
||||
UIManager.Instance.TechTreeUI.SetTechTreeShowHide(false);
|
||||
UIManager.Instance.BottomBarUI.SetBottomBarShowHide(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIManager.Instance.TechTreeUI.SetTechTreeShowHide(true);
|
||||
UIManager.Instance.BottomBarUI.SetBottomBarShowHide(false);
|
||||
UIManager.Instance.BottomInfoUI.SetBottomInfoHide();
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnHeroAction()
|
||||
{
|
||||
if (Main.MapData.CurPlayer != Main.MapData.PlayerMap.SelfPlayerData) return;
|
||||
if (Input.GetKeyDown(KeyCode.C))
|
||||
{
|
||||
if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift))
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if(UIManager.Instance.UIInfoManager.GetCurTaskType() == typeof(UIInfoHeroController))
|
||||
EventManager.Publish(new HideUIInfoHero(){non = 0});
|
||||
else
|
||||
EventManager.Publish(new ShowUIInfoHero(){non = 0});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -91,18 +91,22 @@ namespace TH1_UI.View.Bottom
|
||||
|
||||
private void OnTechButtonClicked()
|
||||
{
|
||||
if (Main.MapData.CurPlayer != Main.MapData.PlayerMap.SelfPlayerData) return;
|
||||
EventManager.Publish(new ShowUIInfoTechTree(){non = 0});
|
||||
Main.Instance.MapInteractionLogic.CancelAllHighlight();
|
||||
}
|
||||
|
||||
private void OnHeroButtonClicked()
|
||||
{
|
||||
if (Main.MapData.CurPlayer != Main.MapData.PlayerMap.SelfPlayerData) return;
|
||||
EventManager.Publish(new ShowUIInfoHero(){non = 0});
|
||||
}
|
||||
|
||||
private void OnNextButtonClicked()
|
||||
{
|
||||
if (Main.MapData.CurPlayer != Main.MapData.PlayerMap.SelfPlayerData) return;
|
||||
Main.Instance.MapInteractionLogic.CancelAllHighlight();
|
||||
EventManager.Publish(new HideUIInfoGridInfo(){non = 0});
|
||||
if (Main.MapData.Net.Mode == NetMode.Multi && !LobbyManager.Instance.Lobby.IsLobbyOwner())
|
||||
{
|
||||
GameNetSender.Instance.TurnEndConfirm();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user