112 lines
3.0 KiB
Lua
112 lines
3.0 KiB
Lua
|
---@class BP_TyrantMonster_2_C:BP_MonsterBoss_C
|
|||
|
---@field UAESkillManager UUAESkillManagerComponent
|
|||
|
---@field SphereShield UStaticMeshComponent
|
|||
|
---@field ShieldValue float
|
|||
|
--Edit Below--
|
|||
|
---@class BP_TyrantMonster_2_C:BP_MonsterBoss_C
|
|||
|
---@field SphereShield UStaticMeshComponent
|
|||
|
---@field UAESkillManager UUAESkillManagerComponent
|
|||
|
---@field ShieldValue float
|
|||
|
-- Edit Below--
|
|||
|
|
|||
|
local MonsterBoss = require('Script.Blueprint.Monster.BP_MonsterBoss')
|
|||
|
-- local BP_TyrantMonster = {
|
|||
|
-- ModifyDamageDelegation = {}
|
|||
|
-- }
|
|||
|
local BP_TyrantMonster = setmetatable(
|
|||
|
{
|
|||
|
--ModifyDamageDelegation = {}
|
|||
|
},
|
|||
|
{
|
|||
|
__index = MonsterBoss,
|
|||
|
__metatable = MonsterBoss
|
|||
|
}
|
|||
|
);
|
|||
|
-- function BP_TyrantMonster:GetReplicatedProperties()
|
|||
|
-- return "RemoveModifyDamageDelegation", "AddModifyDamageDelegationFun"
|
|||
|
-- end
|
|||
|
|
|||
|
--[[
|
|||
|
function BP_TyrantMonster:ReceiveTick(DeltaTime)
|
|||
|
self.SuperClass.ReceiveTick(self, DeltaTime);
|
|||
|
end
|
|||
|
--]]
|
|||
|
|
|||
|
--[[
|
|||
|
function BP_TyrantMonster:ReceiveEndPlay()
|
|||
|
self.SuperClass.ReceiveEndPlay(self);
|
|||
|
end
|
|||
|
--]]
|
|||
|
|
|||
|
--[[
|
|||
|
function BP_TyrantMonster:GetReplicatedProperties()
|
|||
|
return
|
|||
|
end
|
|||
|
--]]
|
|||
|
|
|||
|
--[[
|
|||
|
function BP_TyrantMonster:GetAvailableServerRPCs()
|
|||
|
return
|
|||
|
end
|
|||
|
--]]
|
|||
|
|
|||
|
-- function BP_TyrantMonster:GetGiveExp()
|
|||
|
-- return 5
|
|||
|
-- end
|
|||
|
|
|||
|
-- function BP_TyrantMonster:GetDropRate()
|
|||
|
-- return 95
|
|||
|
-- end
|
|||
|
|
|||
|
--[[
|
|||
|
|
|||
|
time: 20230312
|
|||
|
name: LanTian
|
|||
|
describe:
|
|||
|
添加一个ModifyDamageDelegation的委托table,作用于重载的伤害修改函数BP_CharacterModifyDamage,便利所有的修改委托函数后返回最终伤害值
|
|||
|
AddModifyDamageDelegationFun : 添加一个委托
|
|||
|
RemoveModifyDamageDelegation : 移除一个委托
|
|||
|
|
|||
|
]] --
|
|||
|
|
|||
|
-- ---@field BP_CharacterModifyDamage:fun(DamageAmount:float,DamageEvent:FDamageEvent,EventInstigator:AController,DamageCauser:AActor):float
|
|||
|
-- function BP_TyrantMonster:BP_CharacterModifyDamage(DamageAmount, DamageEvent, EventInstigator, DamageCauser)
|
|||
|
-- print("DamageModify: " .. DamageAmount)
|
|||
|
-- if self.ModifyDamageDelegation then
|
|||
|
-- for k, fun in pairs(self.ModifyDamageDelegation) do
|
|||
|
-- print("DamageModifyBegin: " .. DamageAmount)
|
|||
|
-- DamageAmount = fun(DamageAmount, DamageEvent, EventInstigator, DamageCauser)
|
|||
|
-- print("DamageModifyFunFinsh: " .. DamageAmount)
|
|||
|
|
|||
|
-- end
|
|||
|
-- end
|
|||
|
|
|||
|
-- if DamageAmount < 0 then
|
|||
|
-- DamageAmount = 0
|
|||
|
-- end
|
|||
|
|
|||
|
-- return DamageAmount
|
|||
|
-- end
|
|||
|
|
|||
|
-- function BP_TyrantMonster:RemoveModifyDamageDelegation(Key)
|
|||
|
-- if self.ModifyDamageDelegation[Key] then
|
|||
|
-- self.ModifyDamageDelegation[Key] = nil
|
|||
|
-- return true
|
|||
|
-- end
|
|||
|
-- return false
|
|||
|
-- end
|
|||
|
|
|||
|
-- ---@param Key string
|
|||
|
-- ---@param DelegationFun fun(DamageAmount:float,DamageEvent:FDamageEvent,EventInstigator:AController,DamageCauser:AActor):float
|
|||
|
-- ---@return bool
|
|||
|
-- function BP_TyrantMonster:AddModifyDamageDelegationFun(Key, DelegationFun)
|
|||
|
-- if self.ModifyDamageDelegation[Key] then
|
|||
|
-- return false
|
|||
|
-- else
|
|||
|
-- self.ModifyDamageDelegation[Key] = DelegationFun
|
|||
|
-- return true
|
|||
|
-- end
|
|||
|
-- end
|
|||
|
|
|||
|
return BP_TyrantMonster;
|