diff --git a/DungeonShooting_Godot/excel/excelFile/ActivityObject.xlsx b/DungeonShooting_Godot/excel/excelFile/ActivityObject.xlsx index afac3b9..9ded34d 100644 --- a/DungeonShooting_Godot/excel/excelFile/ActivityObject.xlsx +++ b/DungeonShooting_Godot/excel/excelFile/ActivityObject.xlsx Binary files differ diff --git a/DungeonShooting_Godot/excel/excelFile/Sound.xlsx b/DungeonShooting_Godot/excel/excelFile/Sound.xlsx index d22a730..821da04 100644 --- a/DungeonShooting_Godot/excel/excelFile/Sound.xlsx +++ b/DungeonShooting_Godot/excel/excelFile/Sound.xlsx Binary files differ diff --git a/DungeonShooting_Godot/excel/excelFile/Weapon.xlsx b/DungeonShooting_Godot/excel/excelFile/Weapon.xlsx index a1b1eb6..d0be38d 100644 --- a/DungeonShooting_Godot/excel/excelFile/Weapon.xlsx +++ b/DungeonShooting_Godot/excel/excelFile/Weapon.xlsx Binary files differ diff --git a/DungeonShooting_Godot/resource/config/Weapon.json b/DungeonShooting_Godot/resource/config/Weapon.json index 05b1e27..1890c66 100644 --- a/DungeonShooting_Godot/resource/config/Weapon.json +++ b/DungeonShooting_Godot/resource/config/Weapon.json @@ -56,7 +56,7 @@ "__EquipSound": "", "EquipSoundDelayTime": 0, "__OtherSoundMap": null, - "AiUseAttributeId": "0002", + "__AiUseAttribute": "0002", "AiTargetLockingTime": 0, "AiBulletSpeedScale": 0, "AiAmmoConsumptionProbability": 0 @@ -118,7 +118,7 @@ "__EquipSound": "", "EquipSoundDelayTime": 0, "__OtherSoundMap": null, - "AiUseAttributeId": "", + "__AiUseAttribute": "", "AiTargetLockingTime": 0.5, "AiBulletSpeedScale": 0.7, "AiAmmoConsumptionProbability": 0 @@ -180,7 +180,7 @@ "__EquipSound": "equip0005", "EquipSoundDelayTime": 0.4, "__OtherSoundMap": null, - "AiUseAttributeId": "0004", + "__AiUseAttribute": "0004", "AiTargetLockingTime": 0, "AiBulletSpeedScale": 0, "AiAmmoConsumptionProbability": 0 @@ -242,7 +242,7 @@ "__EquipSound": "equip0005", "EquipSoundDelayTime": 0.4, "__OtherSoundMap": null, - "AiUseAttributeId": "", + "__AiUseAttribute": "", "AiTargetLockingTime": 0.4, "AiBulletSpeedScale": 0.7, "AiAmmoConsumptionProbability": 0 @@ -304,7 +304,7 @@ "__EquipSound": "", "EquipSoundDelayTime": 0, "__OtherSoundMap": null, - "AiUseAttributeId": "0006", + "__AiUseAttribute": "0006", "AiTargetLockingTime": 0, "AiBulletSpeedScale": 0, "AiAmmoConsumptionProbability": 0 @@ -366,7 +366,7 @@ "__EquipSound": "", "EquipSoundDelayTime": 0, "__OtherSoundMap": null, - "AiUseAttributeId": "", + "__AiUseAttribute": "", "AiTargetLockingTime": 1, "AiBulletSpeedScale": 0.7, "AiAmmoConsumptionProbability": 0 @@ -428,7 +428,7 @@ "__EquipSound": "", "EquipSoundDelayTime": 0, "__OtherSoundMap": null, - "AiUseAttributeId": "0008", + "__AiUseAttribute": "0008", "AiTargetLockingTime": 0, "AiBulletSpeedScale": 0, "AiAmmoConsumptionProbability": 0 @@ -490,7 +490,7 @@ "__EquipSound": "", "EquipSoundDelayTime": 0, "__OtherSoundMap": null, - "AiUseAttributeId": "", + "__AiUseAttribute": "", "AiTargetLockingTime": 0.7, "AiBulletSpeedScale": 0.7, "AiAmmoConsumptionProbability": 0 @@ -552,7 +552,7 @@ "__EquipSound": "", "EquipSoundDelayTime": 0.7, "__OtherSoundMap": null, - "AiUseAttributeId": "", + "__AiUseAttribute": "", "AiTargetLockingTime": 0.6, "AiBulletSpeedScale": 0.7, "AiAmmoConsumptionProbability": 0 diff --git a/DungeonShooting_Godot/resource/map/tileMaps/testGroup/inlet/Room1.tscn b/DungeonShooting_Godot/resource/map/tileMaps/testGroup/inlet/Room1.tscn index a38049e..7d14d13 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/testGroup/inlet/Room1.tscn +++ b/DungeonShooting_Godot/resource/map/tileMaps/testGroup/inlet/Room1.tscn @@ -43,4 +43,3 @@ script = ExtResource("3_m4jrh") Type = 5 ItemExpression = "0005" -WaveNumber = 4 diff --git a/DungeonShooting_Godot/src/config/ExcelConfig.cs b/DungeonShooting_Godot/src/config/ExcelConfig.cs index ceeb5e3..a1bd2b5 100644 --- a/DungeonShooting_Godot/src/config/ExcelConfig.cs +++ b/DungeonShooting_Godot/src/config/ExcelConfig.cs @@ -145,6 +145,11 @@ } } + if (!string.IsNullOrEmpty(item.__AiUseAttribute)) + { + item.AiUseAttribute = Weapon_Map[item.__AiUseAttribute]; + } + } catch (Exception e) { diff --git a/DungeonShooting_Godot/src/config/ExcelConfig_Weapon.cs b/DungeonShooting_Godot/src/config/ExcelConfig_Weapon.cs index f684c8d..b071501 100644 --- a/DungeonShooting_Godot/src/config/ExcelConfig_Weapon.cs +++ b/DungeonShooting_Godot/src/config/ExcelConfig_Weapon.cs @@ -173,7 +173,7 @@ public int MaxFireBulletCount; /// - /// 开火前延时 + /// 从按下扳机到发射第一发子弹的延时时, 如果中途松开扳机, 那么延时时间会重新计算, 必须将 'LooseShoot' 设置为 false /// [JsonInclude] public float DelayedTime; @@ -327,8 +327,7 @@ /// Ai 使用该武器时的武器数据, 设置该字段, 可让同一把武器在敌人和玩家手上有不同属性
/// 如果不填则Ai和玩家使用同一种属性 /// - [JsonInclude] - public string AiUseAttributeId; + public Weapon AiUseAttribute; /// /// Ai属性
@@ -410,7 +409,7 @@ inst.EquipSound = EquipSound; inst.EquipSoundDelayTime = EquipSoundDelayTime; inst.OtherSoundMap = OtherSoundMap; - inst.AiUseAttributeId = AiUseAttributeId; + inst.AiUseAttribute = AiUseAttribute; inst.AiTargetLockingTime = AiTargetLockingTime; inst.AiBulletSpeedScale = AiBulletSpeedScale; inst.AiAmmoConsumptionProbability = AiAmmoConsumptionProbability; @@ -437,5 +436,8 @@ [JsonInclude] public Dictionary __OtherSoundMap; + [JsonInclude] + public string __AiUseAttribute; + } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs b/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs index f83b15f..10bfd07 100644 --- a/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs +++ b/DungeonShooting_Godot/src/game/activity/weapon/Weapon.cs @@ -224,9 +224,9 @@ { _playerWeaponAttribute = attribute; _weaponAttribute = attribute; - if (!string.IsNullOrEmpty(attribute.AiUseAttributeId)) + if (attribute.AiUseAttribute != null) { - _aiWeaponAttribute = ExcelConfig.Weapon_Map[attribute.AiUseAttributeId]; + _aiWeaponAttribute = attribute.AiUseAttribute; } else { @@ -564,7 +564,10 @@ if (justDown) { //开火前延时 - _delayedTime = Attribute.DelayedTime; + if (!Attribute.LooseShoot) + { + _delayedTime = Attribute.DelayedTime; + } //扳机按下间隔 _triggerTimer = Attribute.TriggerInterval; //连发数量