quick cocos map使用
'''lua
local MainScene = class("MainScene", function()
return display.newScene("MainScene")
end)
function MainScene:ctor()
self.bloods={}
local blood=display.newSprite("mark.png",display.cx-100,display.cy):addTo(self)
self.bloods[blood]=blood
local blood1=display.newSprite("mark.png",display.cx,display.cy):addTo(self)
self.bloods[blood1]=blood1
local blood2=display.newSprite("mark.png",display.cx+100,display.cy):addTo(self)
self.bloods[blood2]=blood2
for key, blood in pairs(self.bloods) do
print("**")
self.bloods[blood]=nil
blood:removeSelf()
end
end
function MainScene:onEnter()
end
function MainScene:onExit()
end
return MainScene
'''