UI迭代
This commit is contained in:
parent
4956b27a23
commit
cf9f169602
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8dcbc2c85bf63ea4ca518c2fae546257
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 236 KiB |
@ -0,0 +1,114 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8ba9e82b4b2e8cc42a5311723b1fe2cf
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.7 MiB |
@ -0,0 +1,114 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 64dcf1504f9b9fc41b8ab6e65fbb01c0
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d86c36fd4fe394d4ea8648d80d0fc2fc
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 MiB |
@ -0,0 +1,114 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5ca7b76f4e3af8b488365fb0654c4f52
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -6480,3 +6480,9 @@ MonoBehaviour:
|
||||
EN:
|
||||
JP:
|
||||
KR:
|
||||
- ID: 1043
|
||||
ZH: "\u7B2C{param}\u56DE\u5408"
|
||||
TDZH:
|
||||
EN:
|
||||
JP:
|
||||
KR:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -946,7 +946,7 @@ namespace RuntimeData
|
||||
var gameRecord = new GameRecord();
|
||||
gameRecord.Score = PlayerMap.SelfPlayerData.PlayerScore;
|
||||
DateTime now = DateTime.Now;
|
||||
gameRecord.Time = now.ToString("yyyy-MM-dd HH-mm-ss");
|
||||
gameRecord.Time = now.ToString("yyyy.MM.dd HH:mm");
|
||||
var cityList = new List<CityData>();
|
||||
GetCityDataListByPlayerId(PlayerMap.SelfPlayerId, cityList);
|
||||
gameRecord.CityCount = (uint)cityList.Count;
|
||||
|
||||
@ -237,8 +237,6 @@ namespace Logic
|
||||
int tt = 0;
|
||||
if (_curPlayer.Turn < 10)
|
||||
tt = (int)_gameLogic.Main.MapData.MapConfig.AIDiff;
|
||||
Debug.Log(tt);
|
||||
Debug.Log(_gameLogic.Main.MapData.MapConfig.AIDiff);
|
||||
_curPlayer.PlayerWealth += ((int)_curPlayer.Turn / 10) * (int)_gameLogic.Main.MapData.MapConfig.AIDiff + tt;
|
||||
|
||||
_gameLogic.Main.MapData.PlayerMap.OnTurnStart(_gameLogic.Main.MapData, _curPlayer);
|
||||
|
||||
@ -68,6 +68,16 @@ namespace Logic.Multilingual
|
||||
multilingual.ParamList = paramList;
|
||||
multilingual.OnMultilingualChanged();
|
||||
}
|
||||
|
||||
// paramList 是实际的字符串
|
||||
public void SetUIText(TextMeshProUGUI textCom, List<string> paramList=null)
|
||||
{
|
||||
if (!textCom) return;
|
||||
var multilingual = textCom.gameObject.GetComponent<MultilingualTextMono>();
|
||||
if (!multilingual) return;
|
||||
multilingual.ParamList = paramList;
|
||||
multilingual.OnMultilingualChanged();
|
||||
}
|
||||
|
||||
private void RefreshMultilingualData()
|
||||
{
|
||||
|
||||
@ -692,8 +692,12 @@ namespace Logic
|
||||
{
|
||||
|
||||
//处理游戏Hint的模块,仅针对玩家
|
||||
if(playerData.Id == mapData.PlayerMap.SelfPlayerId)
|
||||
if (playerData.Id == mapData.PlayerMap.SelfPlayerId)
|
||||
{
|
||||
MapRenderer.Instance.HintManager.TurnStartSetHint(mapData,playerData);
|
||||
UIManager.Instance.TopBarUI.SetShowTurnHint((int)playerData.Turn);
|
||||
}
|
||||
|
||||
|
||||
//加钱的模块
|
||||
//如果是0回合不用放动画 不用加钱 ,直接return
|
||||
|
||||
@ -105,7 +105,7 @@ public class BottomBarUI
|
||||
|
||||
private void OnRankingClicked()
|
||||
{
|
||||
UIManager.Instance.RankingUI.RankingUINeedShow = !UIManager.Instance.RankingUI.RankingUINeedShow;
|
||||
UIManager.Instance.RankingUI.NeedShow = !UIManager.Instance.RankingUI.NeedShow;
|
||||
}
|
||||
|
||||
public void OnTechTreeClicked()
|
||||
|
||||
@ -59,13 +59,13 @@ namespace UI.Common{
|
||||
// 如果锁定,则不响应点击
|
||||
if (IsLocked)
|
||||
{
|
||||
Debug.Log("Button is locked, cannot be clicked.");
|
||||
//Debug.Log("Button is locked, cannot be clicked.");
|
||||
// 可以在这里播放一个锁定音效或者显示一个提示
|
||||
// AudioManager.Instance.PlayAudio("SFX/UI_buttonLocked");
|
||||
return;
|
||||
}
|
||||
// --- 在这里添加你的点击逻辑 ---
|
||||
Debug.Log("Button Clicked!");
|
||||
//Debug.Log("Button Clicked!");
|
||||
// 播放点击音效
|
||||
AudioManager.Instance.PlayAudio("SFX/UI_buttonClick", 0, 0, false);
|
||||
// 示例:可以触发一个自定义事件或者调用其他方法
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using Logic;
|
||||
using RuntimeData;
|
||||
using Animancer;
|
||||
using TMPro;
|
||||
using UnityEditor.PackageManager.UI;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class HistoryUI
|
||||
@ -9,6 +12,7 @@ public class HistoryUI
|
||||
private Main _main;
|
||||
private MapData _mapData;
|
||||
public GameObject ROHistoryUI;
|
||||
public GameObject ROTable;
|
||||
|
||||
public Button StartButton;
|
||||
|
||||
@ -24,7 +28,14 @@ public class HistoryUI
|
||||
_main = main;
|
||||
_mapData = mapData;
|
||||
ROHistoryUI = UIManager.Instance.ROUIManager.transform.Find("GameUI/HistoryUI").gameObject;
|
||||
ROHistoryUI.transform.Find("CloseButton").GetComponent<Button>().onClick.AddListener(Hide);
|
||||
ROTable = ROHistoryUI.transform.Find("ForceInfoPanel/Scroll/Viewport/Content").gameObject;
|
||||
ROHistoryUI.transform.Find("CloseButton").GetComponent<Button>().onClick.AddListener(
|
||||
() => {
|
||||
Debug.Log("clicked");
|
||||
NeedShow = false;
|
||||
UIManager.Instance.GameUI.MainUI.NeedShow = true;
|
||||
});
|
||||
ROHistoryUI.gameObject.SetActive(false);
|
||||
ROHistoryUI.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
@ -44,6 +55,47 @@ public class HistoryUI
|
||||
// 设置界面逻辑(如音量滑块变化、按钮监听等)也可写在这里
|
||||
}
|
||||
|
||||
public void UpdateHistoryTable()
|
||||
{
|
||||
var dataSize = GameRecordManager.Instance.GameRecordData.Records.Count;
|
||||
var dataList = GameRecordManager.Instance.GameRecordData.Records;
|
||||
if (dataSize > 100) dataSize = 100;
|
||||
|
||||
var t = ROTable.transform.childCount;
|
||||
//如果数量不够,先clone row补足
|
||||
if (t < dataSize)
|
||||
{
|
||||
var sample = ROTable.transform.Find("SampleRow").gameObject;
|
||||
for (; t < dataSize; t++)
|
||||
{
|
||||
GameObject clonedChildB = GameObject.Instantiate(sample, ROTable.transform);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//更新内容
|
||||
for (var i = 0; i < dataSize; i++)
|
||||
{
|
||||
var row = ROTable.transform.GetChild(i).gameObject;
|
||||
row.SetActive(true);
|
||||
row.transform.GetChild(1).Find("Text").GetComponent<TextMeshProUGUI>().text = "30";
|
||||
row.transform.GetChild(2).Find("Text").GetComponent<TextMeshProUGUI>().text = dataList[i].Score.ToString();
|
||||
row.transform.GetChild(3).Find("Text").GetComponent<TextMeshProUGUI>().text = "蕾米莉亚";
|
||||
row.transform.GetChild(4).Find("Text").GetComponent<TextMeshProUGUI>().text = dataList[i].MapHeight + " × " + dataList[i].MapWidth;
|
||||
row.transform.GetChild(5).Find("Text").GetComponent<TextMeshProUGUI>().text = dataList[i].AIDiff.ToString();
|
||||
row.transform.GetChild(6).Find("Text").GetComponent<TextMeshProUGUI>().text = dataList[i].PlayerCount.ToString();
|
||||
row.transform.GetChild(7).Find("Text").GetComponent<TextMeshProUGUI>().text = "1.0";
|
||||
if(DateTime.TryParse(dataList[i].Time,out var dateTime))
|
||||
row.transform.GetChild(8).Find("Text").GetComponent<TextMeshProUGUI>().text = dateTime.ToString("yyyy.MM.dd HH:MM");
|
||||
}
|
||||
|
||||
|
||||
//将多出来的row设置active=false
|
||||
for(var i = dataSize;i < t;i++)
|
||||
ROTable.transform.GetChild(i).gameObject.SetActive(false);
|
||||
|
||||
}
|
||||
public void Show()
|
||||
{
|
||||
if (_isShowing || _isAnimating) return;
|
||||
@ -51,7 +103,9 @@ public class HistoryUI
|
||||
_isShowing = true;
|
||||
_isAnimating = true;
|
||||
ROHistoryUI.SetActive(true);
|
||||
|
||||
|
||||
UpdateHistoryTable();
|
||||
|
||||
AnimancerComponent animancer = ROHistoryUI.GetComponent<AnimancerComponent>();
|
||||
AnimationClip fadeInClip = Resources.Load<AnimationClip>("Animations/UI/SettingPanelFadeIn");
|
||||
if (fadeInClip != null)
|
||||
|
||||
@ -14,7 +14,7 @@ public class RankingUI
|
||||
private MapData _mapData;
|
||||
public GameObject RORankingUI;
|
||||
|
||||
public bool RankingUINeedShow = false;
|
||||
public bool NeedShow = false;
|
||||
|
||||
private bool _isShowing = false;
|
||||
private bool _isAnimating = false;
|
||||
@ -86,16 +86,16 @@ public class RankingUI
|
||||
|
||||
if (_isAnimating) return;
|
||||
|
||||
if (RankingUINeedShow && !RORankingUI.activeSelf)
|
||||
if (NeedShow && !RORankingUI.activeSelf)
|
||||
{
|
||||
UpdateRankingList();
|
||||
Show();
|
||||
}
|
||||
else if (!RankingUINeedShow && RORankingUI.activeSelf)
|
||||
else if (!NeedShow && RORankingUI.activeSelf)
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
else if(RankingUINeedShow && RORankingUI.activeSelf)
|
||||
else if(NeedShow && RORankingUI.activeSelf)
|
||||
{
|
||||
UpdateRankingList();
|
||||
}
|
||||
|
||||
@ -1,14 +1,21 @@
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
using Animancer;
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
using Logic;
|
||||
using RuntimeData;
|
||||
using Logic.Multilingual;
|
||||
using TH1Resource;
|
||||
|
||||
public class TopBarUI
|
||||
{
|
||||
private Main _main;
|
||||
private MapData _mapData;
|
||||
public GameObject ROTopBarUI;
|
||||
public GameObject ROTurnHint;
|
||||
|
||||
//标记,是否显示回合提示
|
||||
private bool _showTurnHint;
|
||||
private TextMeshProUGUI _money;
|
||||
private TextMeshProUGUI _faith;
|
||||
private TextMeshProUGUI _turn;
|
||||
@ -23,6 +30,7 @@ public class TopBarUI
|
||||
_main = main;
|
||||
_mapData = mapData;
|
||||
ROTopBarUI = UIManager.Instance.ROUIManager.transform.Find("TopBarPanel").gameObject;
|
||||
ROTurnHint = ROTopBarUI.transform.Find("TurnHint").gameObject;
|
||||
_money = ROTopBarUI.transform.Find("MoneyPanel/Text").GetComponent<TextMeshProUGUI>();
|
||||
_faith = ROTopBarUI.transform.Find("FaithPanel/Text").GetComponent<TextMeshProUGUI>();
|
||||
_turn = ROTopBarUI.transform.Find("TurnPanel/Text").GetComponent<TextMeshProUGUI>();
|
||||
@ -30,12 +38,41 @@ public class TopBarUI
|
||||
_isShow = true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void ShowTurnHint()
|
||||
{
|
||||
var anim = ROTurnHint.GetComponent<AnimancerComponent>();
|
||||
if (anim == null) return;
|
||||
ROTurnHint.SetActive(true);
|
||||
anim.Play(ResourceCache.Instance.AnimCache.UICommonPanelFadeIn);
|
||||
Timer.Instance.TimerRegister(this, () =>
|
||||
{
|
||||
anim.Play(ResourceCache.Instance.AnimCache.UICommonPanelFadeOut);
|
||||
},1.5f);
|
||||
Timer.Instance.TimerRegister(this, () =>
|
||||
{
|
||||
ROTurnHint.SetActive(false);
|
||||
},1.5f + ResourceCache.Instance.AnimCache.UICommonPanelFadeOut.length);
|
||||
}
|
||||
|
||||
public void SetShowTurnHint(int turn)
|
||||
{
|
||||
_showTurnHint = true;
|
||||
var list = new List<string>();
|
||||
list.Add(turn.ToString());
|
||||
Debug.Log(list[0]);
|
||||
MultilingualManager.Instance.SetUIText(ROTurnHint.GetComponent<TextMeshProUGUI>(), list);
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if(_isShow && ! ROTopBarUI.activeSelf)
|
||||
ROTopBarUI.SetActive(true);
|
||||
if (_showTurnHint)
|
||||
{
|
||||
_showTurnHint = false;
|
||||
ShowTurnHint();
|
||||
}
|
||||
_money.text = _main.MapData.PlayerMap.SelfPlayerData.PlayerWealth +
|
||||
" <color=yellow>+ " + Main.PlayerLogic.GetPlayerStarsPerTurn(_main.MapData, _main.MapData.PlayerMap.SelfPlayerData.Id) + "</color>";
|
||||
_faith.text = _main.MapData.PlayerMap.SelfPlayerData.PlayerScore.ToString();
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -97,4 +97,4 @@ Tech:None
|
||||
---%$#@!%$#@!%$#@!%$#@!!@#$%1006%$#@!-------- ID=233, Civ=7, Force=7 --------
|
||||
Money = 5, Stratery = ???
|
||||
Tech:None
|
||||
---%$#@!%$#@!%$#@!%$#@!!@#$%1007%$#@!治疗提示%$#@!%$#@!%$#@!%$#@!!@#$%1008%$#@!1%$#@!%$#@!%$#@!%$#@!!@#$%1009%$#@!建设提示%$#@!%$#@!%$#@!%$#@!!@#$%1010%$#@!2%$#@!%$#@!%$#@!%$#@!!@#$%1011%$#@!需要恢复!%$#@!%$#@!%$#@!%$#@!!@#$%1012%$#@!生命值较低,防御攻击都会下降,可以使用<color=yellow>恢复</color>。领土内恢复翻倍。%$#@!%$#@!%$#@!%$#@!!@#$%1013%$#@!占领城市!%$#@!%$#@!%$#@!%$#@!!@#$%1014%$#@!<color=yellow>占领</color>他人城市或村庄,是发展壮大的必要步骤。%$#@!%$#@!%$#@!%$#@!!@#$%1015%$#@!挖掘宝藏!%$#@!%$#@!%$#@!%$#@!!@#$%1016%$#@!<color=yellow>挖掘</color>宝藏,将有概率获得巨额财富,强力单位,或者一个随机科技。%$#@!%$#@!%$#@!%$#@!!@#$%1017%$#@!训练单位!%$#@!%$#@!%$#@!%$#@!!@#$%1018%$#@!无论是应对潜在的敌人威胁,还是探索地图挖掘宝藏,训练单位都是第一步。%$#@!%$#@!%$#@!%$#@!!@#$%1019%$#@!可改造农田%$#@!%$#@!%$#@!%$#@!!@#$%1020%$#@!升级科技,将庄稼改造为农田吧!%$#@!%$#@!%$#@!%$#@!!@#$%1021%$#@!可捕获渔业%$#@!%$#@!%$#@!%$#@!!@#$%1022%$#@!升级科技,捕获渔业,升级城市吧!%$#@!%$#@!%$#@!%$#@!!@#$%1023%$#@!可狩猎%$#@!%$#@!%$#@!%$#@!!@#$%1024%$#@!升级科技,狩猎动物,升级城市吧!%$#@!%$#@!%$#@!%$#@!!@#$%1025%$#@!可改造矿场%$#@!%$#@!%$#@!%$#@!!@#$%1026%$#@!升级科技,将矿石改造为采矿场吧!%$#@!%$#@!%$#@!%$#@!!@#$%1027%$#@!可收获水果%$#@!%$#@!%$#@!%$#@!!@#$%1028%$#@!升级科技,收获水果,升级城市吧!%$#@!%$#@!%$#@!%$#@!!@#$%1029%$#@!学习<color=yellow>种田</color>科技,就能将庄稼改造为农田,并为城市提供2点经验。在学习<color=yellow>采集</color>科技前,无法发现庄稼。%$#@!%$#@!%$#@!%$#@!!@#$%1030%$#@!学习<color=yellow>捕鱼</color>科技,就能捕获渔业,并为城市提供1点经验。%$#@!%$#@!%$#@!%$#@!!@#$%1031%$#@!学习<color=yellow>狩猎</color>科技,就能捕获猎物,并为城市提供1点经验。%$#@!%$#@!%$#@!%$#@!!@#$%1032%$#@!学习<color=yellow>采矿</color>科技,就能将矿山改造为采矿场,并为城市提供2点经验。在学习<color=yellow>爬山</color>科技之前,无法发现矿山。%$#@!%$#@!%$#@!%$#@!!@#$%1033%$#@!学习<color=yellow>采集</color>科技,就能收获水果,并为城市提供1点经验。%$#@!%$#@!%$#@!%$#@!!@#$%1034%$#@!学习<color=yellow>耕种</color>科技,就能将庄稼改造为农田,并为城市提供2点经验。在学习<color=yellow>采集</color>科技前,无法发现庄稼。%$#@!%$#@!%$#@!%$#@!!@#$%1035%$#@!确认选择%$#@!%$#@!%$#@!%$#@!!@#$%1036%$#@!蕾米莉亚·斯卡雷特伫立于金字塔之巅。她率领红魔馆南征北讨,驱策妖精女仆开垦于尼罗河畔,筑起属于斯卡雷特王朝的辉煌帝国。%$#@!%$#@!%$#@!%$#@!!@#$%1037%$#@!开始游戏!%$#@!%$#@!%$#@!%$#@!!@#$%1038%$#@!游戏模式%$#@!%$#@!%$#@!%$#@!!@#$%1039%$#@!创造模式%$#@!%$#@!%$#@!%$#@!!@#$%1040%$#@!历史战绩%$#@!%$#@!%$#@!%$#@!!@#$%1041%$#@!城市%$#@!%$#@!%$#@!%$#@!!@#$%1042%$#@!地图设置%$#@!%$#@!%$#@!%$#@!!@#$%
|
||||
---%$#@!%$#@!%$#@!%$#@!!@#$%1007%$#@!治疗提示%$#@!%$#@!%$#@!%$#@!!@#$%1008%$#@!1%$#@!%$#@!%$#@!%$#@!!@#$%1009%$#@!建设提示%$#@!%$#@!%$#@!%$#@!!@#$%1010%$#@!2%$#@!%$#@!%$#@!%$#@!!@#$%1011%$#@!需要恢复!%$#@!%$#@!%$#@!%$#@!!@#$%1012%$#@!生命值较低,防御攻击都会下降,可以使用<color=yellow>恢复</color>。领土内恢复翻倍。%$#@!%$#@!%$#@!%$#@!!@#$%1013%$#@!占领城市!%$#@!%$#@!%$#@!%$#@!!@#$%1014%$#@!<color=yellow>占领</color>他人城市或村庄,是发展壮大的必要步骤。%$#@!%$#@!%$#@!%$#@!!@#$%1015%$#@!挖掘宝藏!%$#@!%$#@!%$#@!%$#@!!@#$%1016%$#@!<color=yellow>挖掘</color>宝藏,将有概率获得巨额财富,强力单位,或者一个随机科技。%$#@!%$#@!%$#@!%$#@!!@#$%1017%$#@!训练单位!%$#@!%$#@!%$#@!%$#@!!@#$%1018%$#@!无论是应对潜在的敌人威胁,还是探索地图挖掘宝藏,训练单位都是第一步。%$#@!%$#@!%$#@!%$#@!!@#$%1019%$#@!可改造农田%$#@!%$#@!%$#@!%$#@!!@#$%1020%$#@!升级科技,将庄稼改造为农田吧!%$#@!%$#@!%$#@!%$#@!!@#$%1021%$#@!可捕获渔业%$#@!%$#@!%$#@!%$#@!!@#$%1022%$#@!升级科技,捕获渔业,升级城市吧!%$#@!%$#@!%$#@!%$#@!!@#$%1023%$#@!可狩猎%$#@!%$#@!%$#@!%$#@!!@#$%1024%$#@!升级科技,狩猎动物,升级城市吧!%$#@!%$#@!%$#@!%$#@!!@#$%1025%$#@!可改造矿场%$#@!%$#@!%$#@!%$#@!!@#$%1026%$#@!升级科技,将矿石改造为采矿场吧!%$#@!%$#@!%$#@!%$#@!!@#$%1027%$#@!可收获水果%$#@!%$#@!%$#@!%$#@!!@#$%1028%$#@!升级科技,收获水果,升级城市吧!%$#@!%$#@!%$#@!%$#@!!@#$%1029%$#@!学习<color=yellow>种田</color>科技,就能将庄稼改造为农田,并为城市提供2点经验。在学习<color=yellow>采集</color>科技前,无法发现庄稼。%$#@!%$#@!%$#@!%$#@!!@#$%1030%$#@!学习<color=yellow>捕鱼</color>科技,就能捕获渔业,并为城市提供1点经验。%$#@!%$#@!%$#@!%$#@!!@#$%1031%$#@!学习<color=yellow>狩猎</color>科技,就能捕获猎物,并为城市提供1点经验。%$#@!%$#@!%$#@!%$#@!!@#$%1032%$#@!学习<color=yellow>采矿</color>科技,就能将矿山改造为采矿场,并为城市提供2点经验。在学习<color=yellow>爬山</color>科技之前,无法发现矿山。%$#@!%$#@!%$#@!%$#@!!@#$%1033%$#@!学习<color=yellow>采集</color>科技,就能收获水果,并为城市提供1点经验。%$#@!%$#@!%$#@!%$#@!!@#$%1034%$#@!学习<color=yellow>耕种</color>科技,就能将庄稼改造为农田,并为城市提供2点经验。在学习<color=yellow>采集</color>科技前,无法发现庄稼。%$#@!%$#@!%$#@!%$#@!!@#$%1035%$#@!确认选择%$#@!%$#@!%$#@!%$#@!!@#$%1036%$#@!蕾米莉亚·斯卡雷特伫立于金字塔之巅。她率领红魔馆南征北讨,驱策妖精女仆开垦于尼罗河畔,筑起属于斯卡雷特王朝的辉煌帝国。%$#@!%$#@!%$#@!%$#@!!@#$%1037%$#@!开始游戏!%$#@!%$#@!%$#@!%$#@!!@#$%1038%$#@!游戏模式%$#@!%$#@!%$#@!%$#@!!@#$%1039%$#@!创造模式%$#@!%$#@!%$#@!%$#@!!@#$%1040%$#@!历史战绩%$#@!%$#@!%$#@!%$#@!!@#$%1041%$#@!城市%$#@!%$#@!%$#@!%$#@!!@#$%1042%$#@!地图设置%$#@!%$#@!%$#@!%$#@!!@#$%1043%$#@!第{param}回合%$#@!%$#@!%$#@!%$#@!!@#$%
|
||||
Loading…
x
Reference in New Issue
Block a user