我看網站上的用法有更新 你在參考看看
NL.RegVSEnemyCreateEvent(nil,”MyVSEnemyCreateCallBack”);
function MyVSEnemyCreateCallBack(CharIndex, EncountIndex, EnemyNum, EnemyList)
local EnemyIndex = Data.EnemyGetIndex(1); -- 获取虎人的EnemyIndex
local NewEnemyList = {}
for i=1,16,1 do
if i <= 10 then
NewEnemyList[i] = EnemyIndex; -- 10个虎人
else
NewEnemyList[i] = -1; -- 剩下的无效
end
end
return NewEnemyList;
end