ro-table/Asstes/Resources/Script/FrameWork/command/ServiceEffectCommand.txt
2025-06-04 05:02:57 +08:00

37 lines
1.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

ServiceEffectCommand = class("ServiceEffectCommand",pm.SimpleCommand)
function ServiceEffectCommand:execute(note)
local proxy = NSceneEffectProxy.Instance
local data = note.body
local effectType = data.effecttype
local opt = data.opt
if(effectType == SceneUser2_pb.EEFFECTTYPE_NORMAL)then
if(opt == SceneUser2_pb.EEFFECTOPT_PLAY) then
if(data.charid >0) then
proxy:Add(data)
else
print("伺服器發來新增特效竟然沒有玩家ID")
end
elseif(opt == SceneUser2_pb.EEFFECTOPT_DELETE) then
proxy:Remove(data)
end
elseif(effectType == SceneUser2_pb.EEFFECTTYPE_SCENEEFFECT)then
if(opt == SceneUser2_pb.EEFFECTOPT_PLAY) then
if(data.id >0) then
proxy:Server_AddSceneEffect(data)
else
print("伺服器發來新增場景特效竟然沒有ID")
end
elseif(opt == SceneUser2_pb.EEFFECTOPT_DELETE) then
proxy:Remove(data)
end
elseif(effectType == SceneUser2_pb.EEFFECTTYPE_ACCEPTQUEST)then
FloatingPanel.Instance:FloatingMidEffect(EffectMap.UI.accept)
elseif(effectType == SceneUser2_pb.EEFFECTTYPE_FINISHQUEST)then
FloatingPanel.Instance:FloatingMidEffect(EffectMap.UI.complete)
elseif(effectType == SceneUser2_pb.EEFFECTTYPE_MVPSHOW)then
FloatingPanel.Instance:FloatingMidEffect(EffectMap.UI.warning,function ( effect )
effect.transform.localPosition = Vector3(0,100,0)
end)
end
end