Wow this thing is now really freaking me out. i tried what you said. its not that director. its just a Class that calls storyboard
function aDirector.GameScreen:ShowLevel(pLevelID) local aOptions = { params = { LevelID = pLevelID } }; aDirector.StoryBoard.gotoScene("Scenes.GameScreen", aOptions) end
function aDirector.GameScreen:ReloadLevel(pLevelID) local aOptions = { params = { LevelID = pLevelID } }; aDirector.StoryBoard.gotoScene("Scenes.GameScreenReload", aOptions) end
I think i found the problem. Its not with the main transition.
--PROBLEM IS NOT HERE aEnemy:EvilStart() aEnemy.TransitionInst = transition.to(aEnemy, {time = 1000, onRepeat = function(obj) obj:EvilLoop() end, iterations = 0})
obj:EvilLoop() seems to be causing problem. Below is that function.
function aEnemy:EvilLoop() local enemy = self; enemy:Bung() enemy = nil end
and Bung looks like the following
function aEnemy:Bung() local BoundInTime = 500 local BoundOutTime = 800 transition.cancel(self.EyeL) transition.cancel(self.EyeR) transition.cancel(self.Mouth) transition.cancel(self.Body) self.EyeL.Trans = transition.to(self.EyeL, {time = BoundInTime, y = self.EyeL.Default.y + 3, transition = easing.outBack, tag = "inGameTrans" }) self.EyeR.Trans = transition.to(self.EyeR, {time = BoundInTime, y = self.EyeR.Default.y + 3, transition = easing.outBack, tag = "inGameTrans" }) self.Mouth.Trans= transition.to(self.Mouth, {time = BoundInTime, y = self.Mouth.Default.y + 3, transition = easing.outBack, tag = "inGameTrans" }) self.Body.Trans = transition.to(self.Body, {time = BoundInTime, height = self.Body.Default.height - 6, y = self.Body.Default.y + 3, transition = easing.outBack, tag = "inGameTrans"}) self.EyeL.Trans = transition.to(self.EyeL, {delay = BoundInTime, time = BoundOutTime, y = self.EyeL.Default.y, transition = easing.outElastic, tag = "inGameTrans" }) self.EyeR.Trans = transition.to(self.EyeR, {delay = BoundInTime, time = BoundOutTime, y = self.EyeR.Default.y, transition = easing.outElastic, tag = "inGameTrans" }) self.Mouth.Trans= transition.to(self.Mouth, {delay = BoundInTime, time = BoundOutTime, y = self.Mouth.Default.y, transition = easing.outElastic, tag = "inGameTrans" }) self.Body.Trans = transition.to(self.Body, {delay = BoundInTime, time = BoundOutTime, height = self.Body.Default.height, y = self.Body.Default.y,transition = easing.outElastic, tag = "inGameTrans" }) end
I modified the removal methods “aEnemy:CancelTimers” like this
function aEnemy:CancelTimers() if (self.TransitionInst ~= nil) then transition.cancel(self.TransitionInst) self.TransitionInst = nil end if (self.EyeL.Trans ~= nil) then transition.cancel(self.EyeL.Trans) self.EyeL.Trans = nil end if (self.EyeR.Trans ~= nil) then transition.cancel(self.EyeR.Trans) self.EyeR.Trans = nil end if (self.Mouth.Trans ~= nil) then transition.cancel(self.Mouth.Trans) self.Mouth.Trans = nil end if (self.Body.Trans ~= nil) then transition.cancel(self.Body.Trans) self.Body.Trans = nil end transition.cancel() self.Body:removeSelf() self.EyeL:removeSelf() self.EyeR:removeSelf() self.Mouth:removeSelf() self.collisionBox:removeSelf() self.Body = nil self.EyeL = nil self.EyeR = nil self.Mouth = nil self.collisionBox = nil self:removeSelf() self = nil end
Still no hopes