using Gameplay.Unit.Data; namespace Gameplay.Buff { public abstract class BaseDamageBuff : BaseBuff { protected float _GetScaleForUnitType(float scaleValue1, float scaleValue2, float scaleValue3) { // 如果目标是人形还要进行增伤 if (owner.gameunitType == EGameUnitType.Character) { return scaleValue1; } // 如果目标是载具还要进行增伤 if (owner.gameunitType == EGameUnitType.Vehicle) { return scaleValue2; } // 如果目标是建筑还要进行增伤 if (owner.gameunitType == EGameUnitType.Building) { return scaleValue3; } if (owner.gameunitType == EGameUnitType.Summon) { var unitSummon = owner as Summon.BaseSummon; if (unitSummon == null) { return 1f; } if (unitSummon.subUnitType == EGameUnitType.Character) { return scaleValue1; } if (unitSummon.subUnitType == EGameUnitType.Vehicle) { return scaleValue2; } if (unitSummon.subUnitType == EGameUnitType.Building) { return scaleValue3; } } return 1f; } } }