46 lines
1.2 KiB
Lua
46 lines
1.2 KiB
Lua
-- Script.Global.BuffSystem.BuffAction.BuffAction_Sensing
|
|
local BuffActionBase = require('Script.Global.BuffSystem.BuffActionBase')
|
|
|
|
local BuffAction_Sensing = setmetatable(
|
|
{
|
|
-- 检测距离 m
|
|
Range = 80.;
|
|
|
|
NowWeapon = nil
|
|
},
|
|
{ __index = BuffActionBase, __metatable = BuffActionBase }
|
|
);
|
|
|
|
function BuffAction_Sensing:LuaDoAction()
|
|
BuffActionBase.LuaDoAction(self)
|
|
|
|
UGCLogSystem.Log("[BuffAction_Sensing_LuaDoAction]")
|
|
|
|
if UGCGameSystem.IsServer() then
|
|
local OwnerPawn = self:GetOwnerPawn()
|
|
if OwnerPawn and OwnerPawn.PlayerKey then
|
|
UGCSendRPCSystem.ClientShowUI(OwnerPawn.PlayerKey, WidgetConfig.EUIType.TraceEnemy, true, false, self.Range)
|
|
end
|
|
else
|
|
if self:GetOwnerPawn() == UGCSystemLibrary.GetLocalPlayerPawn() then
|
|
WidgetManager.ShowPanel(WidgetConfig.EUIType.TraceEnemy, false, self.Range)
|
|
end
|
|
end
|
|
|
|
end
|
|
|
|
function BuffAction_Sensing:LuaUndoAction()
|
|
BuffActionBase.LuaUndoAction(self)
|
|
if UGCGameSystem.IsServer() then return true end
|
|
UGCLogSystem.Log("[BuffAction_Sensing_LuaUndoAction]")
|
|
end
|
|
|
|
|
|
|
|
function BuffAction_Sensing:UpdateGunRateOfFire(WeaponGun)
|
|
|
|
end
|
|
|
|
|
|
|
|
return BuffAction_Sensing; |