我总是看到人们在勾结函数中写(示例):
local onCollision = function(event)
if event.phase == "began" then
event.object2:removeSelf();
event.object2 = nil;
end
end
Runtime:addEventListener("collision",onCollision);
为什么你不只是写:
local onCollision = function(event)
event.object2:removeSelf();
event.object2 = nil;
end
Runtime:addEventListener("collision",onCollision);
我不明白这是什么意思?