Hey Guys,
Anyone know why or how the below code is causing another Ojbects eventListener to stop working
[lua]
placeFireLamp = function (event)
if event.phase == “began” then
print( “Placing FireLamp” )
print( event.phase )
powerup_fireLampObj[powerup_fireLampCount] = display.newSprite( sheetFireLamp, sequenceData)
powerup_fireLampObj[powerup_fireLampCount].x = event.x
powerup_fireLampObj[powerup_fireLampCount].y = event.y
powerup_fireLampObj[powerup_fireLampCount]:play( )
powerup_fireLampCount = powerup_fireLampCount + 1
if powerup_fireLampCount >= 3 then
print( “Cannot Place any more firelamps” )
Runtime:removeEventListener(“touch”, placeFireLamp)
timeKeep:resume()
transition.resume(“bugTransitions”)
timer.resume( tmr_createBug )
end
end
end
Runtime:addEventListener(“touch”, placeFireLamp)
end
[/lua]
causes the following eventListener to stop working (e.g stops the Bugs from being tapped and killed)
[lua] --setup tab listener
bug[TotalBugs]:addEventListener( “tap”, bugKilled )[/lua]