修改子弹命中音效id为string

main
刘涛 2024-09-06 18:35:09 +08:00
parent 1eaf80f688
commit 97d474f83a
3 changed files with 771 additions and 771 deletions

View File

@ -143,9 +143,9 @@ namespace Gameplay.Bullet
{
// 播放销毁音效
var audioId = configData.HitAudioId;
if (audioId > 0)
if (!string.IsNullOrEmpty(audioId))
{
AudioManager.Instance.PlayAudioOld(audioId, AudioCriManager.EPlayType.Sound, rootObj).Forget();
AudioManager.Instance.PlayAudio(audioId, AudioCriManager.EPlayType.Sound, rootObj);
}
// 销毁obj
if (rootObj != null)

View File

@ -22,7 +22,7 @@ public sealed partial class DataBullet : Bright.Config.BeanBase
{ if(!_json["Name"].IsString) { throw new SerializationException(); } Name = _json["Name"]; }
{ if(!_json["BulletType"].IsNumber) { throw new SerializationException(); } BulletType = _json["BulletType"]; }
{ if(!_json["PrefabPath"].IsString) { throw new SerializationException(); } PrefabPath = _json["PrefabPath"]; }
{ if(!_json["HitAudioId"].IsNumber) { throw new SerializationException(); } HitAudioId = _json["HitAudioId"]; }
{ if(!_json["HitAudioId"].IsString) { throw new SerializationException(); } HitAudioId = _json["HitAudioId"]; }
{ if(!_json["DestroyEffectId"].IsNumber) { throw new SerializationException(); } DestroyEffectId = _json["DestroyEffectId"]; }
{ if(!_json["FlySpeed"].IsNumber) { throw new SerializationException(); } FlySpeed = _json["FlySpeed"]; }
{ if(!_json["FilterType"].IsNumber) { throw new SerializationException(); } FilterType = (SkillCfg.ETargetType)_json["FilterType"].AsInt; }
@ -38,7 +38,7 @@ public sealed partial class DataBullet : Bright.Config.BeanBase
PostInit();
}
public DataBullet(int ID, string Name, int BulletType, string PrefabPath, int HitAudioId, int DestroyEffectId, float FlySpeed, SkillCfg.ETargetType FilterType, System.Collections.Generic.List<CharacterCfg.Ejob> JobFilters, System.Collections.Generic.List<CharacterCfg.Efaction> FractionFilter, System.Collections.Generic.List<FightCfg.EMoraleType> MoraleFilter, System.Collections.Generic.List<int> ExistBuffGroupIdFilter, bool OnlyCharacter, bool CanUseOnPretent, int AreaId, float LightDuring, System.Collections.Generic.List<int> BuffList )
public DataBullet(int ID, string Name, int BulletType, string PrefabPath, string HitAudioId, int DestroyEffectId, float FlySpeed, SkillCfg.ETargetType FilterType, System.Collections.Generic.List<CharacterCfg.Ejob> JobFilters, System.Collections.Generic.List<CharacterCfg.Efaction> FractionFilter, System.Collections.Generic.List<FightCfg.EMoraleType> MoraleFilter, System.Collections.Generic.List<int> ExistBuffGroupIdFilter, bool OnlyCharacter, bool CanUseOnPretent, int AreaId, float LightDuring, System.Collections.Generic.List<int> BuffList )
{
this.ID = ID;
this.Name = Name;
@ -84,7 +84,7 @@ public sealed partial class DataBullet : Bright.Config.BeanBase
/// <summary>
/// 子弹击中目标音效
/// </summary>
public int HitAudioId { get; private set; }
public string HitAudioId { get; private set; }
/// <summary>
/// 销毁特效id
/// </summary>

File diff suppressed because it is too large Load Diff