优化技能CD时间

This commit is contained in:
2026-07-05 21:36:06 +08:00
parent ad90d35bd7
commit c7279fd1a7
6 changed files with 150 additions and 3 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ namespace IndianOceanAssets.Engine2_5D
[Header("Movement")] [Header("Movement")]
[SerializeField] private float moveSpeed = 5f; // Speed at which the player moves [SerializeField] private float moveSpeed = 5f; // Speed at which the player moves
[SerializeField] private float rollForce = 8f; // Force applied during roll [SerializeField] private float rollForce = 8f; // Force applied during roll
[SerializeField] private float rollCooldown = 1f; // Cooldown time between rolls [SerializeField] private float rollCooldown = 3f; // Cooldown time between rolls
private Rigidbody rb; // Rigidbody reference for physics private Rigidbody rb; // Rigidbody reference for physics
private Animator animator; // Animator reference for animations private Animator animator; // Animator reference for animations
Binary file not shown.

After

Width:  |  Height:  |  Size: 275 KiB

+133
View File
@@ -0,0 +1,133 @@
fileFormatVersion: 2
guid: BnJMsSr5B351OLIZrHS9CkInTQ5VvFsSolP977dzlStSSi2tVdLpWyU=
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
webStreaming: 0
priorityLevel: 0
uploadedMode: 2
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
maxPlaceholderSize: 32
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
maxPlaceholderSize: 32
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: Server
maxTextureSize: 2048
maxPlaceholderSize: 32
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:
+14
View File
@@ -100,6 +100,20 @@ namespace GameFramework
Debug.Log("[GameHUD] 延迟订阅 ScoreManager.onScoreChanged 成功"); Debug.Log("[GameHUD] 延迟订阅 ScoreManager.onScoreChanged 成功");
} }
// 延迟查找玩家(GameSpawnManager 可能比 HUD 晚创建玩家)
if (_playerHealth == null)
{
var player = GameObject.FindWithTag("Player");
if (player != null)
{
_playerHealth = player.GetComponent<HealthSystem>();
_lanternSystem = player.GetComponent<SpiritLanternSystem>();
_echoSystem = player.GetComponent<EchoSystem>();
_playerController = player.GetComponent<PlayerController>();
Debug.Log("[GameHUD] 延迟找到玩家,已绑定组件");
}
}
UpdateLifeIcons(); UpdateLifeIcons();
UpdateSkillCooldowns(); UpdateSkillCooldowns();
} }
+1 -1
View File
@@ -52,7 +52,7 @@ namespace IndianOceanAssets.Engine2_5D
[Header("冷却")] [Header("冷却")]
[Tooltip("回声冷却时间(秒)")] [Tooltip("回声冷却时间(秒)")]
[SerializeField] private float cooldown = 2f; [SerializeField] private float cooldown = 3f;
// 全局 shader 属性 ID(通过 Shader.SetGlobalX 设置,所有描边精灵共享) // 全局 shader 属性 ID(通过 Shader.SetGlobalX 设置,所有描边精灵共享)
private static readonly int EchoCenterID = Shader.PropertyToID("_EchoCenter"); private static readonly int EchoCenterID = Shader.PropertyToID("_EchoCenter");
+1 -1
View File
@@ -22,7 +22,7 @@ namespace IndianOceanAssets.Engine2_5D
[Header("冷却")] [Header("冷却")]
[Tooltip("放置灵灯的冷却时间(秒)")] [Tooltip("放置灵灯的冷却时间(秒)")]
[SerializeField] private float cooldown = 3f; [SerializeField] private float cooldown = 5f;
[Header("灵灯预制体")] [Header("灵灯预制体")]
[SerializeField] private GameObject lanternPrefab; [SerializeField] private GameObject lanternPrefab;