local function pressedCB_ctrl()
SL:SendLuaNetMsg(1001, 1, 0, 0, "按下ctrl")
zuji = 1
end
local function releaseCB_ctrl()
SL:SendLuaNetMsg(1001, 0, 0, 0, "松开ctrl")
zuji = 0
end
GUI:addKeyboardEvent("KEY_CTRL", pressedCB_ctrl,releaseCB_ctrl)
SL:RegisterLUAEvent(LUA_EVENT_PLAYER_ACTION_BEGIN, "TTT", function(data)
local id = data and data.id
if id then
local posX = SL:GetMetaValue("ACTOR_POSITION_X", id)
local posY = SL:GetMetaValue("ACTOR_POSITION_Y", id)
if posX and posY then
local actBegin = data.act
if( actBegin == 1 or actBegin == 6 or actBegin == 17) and zuji == 1 then
local eff = GUI:Effect_Create(GUI:Attach_SceneB(), string.format("foot_effect%s_%s%s", id, posX, posY), posX, posY, 0, 31068)
GUI:setRotation(eff, 270)
if eff then
GUI:Effect_addOnCompleteEvent(eff, function()
GUI:removeFromParent(eff)
end)
end
end
end
end
end)