B4i version: 3.01
Parsing code. (0.15s)
Compiling code. (0.36s)
Compiling layouts code. (0.00s)
Compiling debugger engine code. Error
B4i line: 1626
End Sub 'END OF LOADLEVEL SUB!!!!
javac 1.8.0_91
shell\src\www\sagital\physics\b4i_main_subs_0.java:3693: error: code too large for try statement
catch (Exception e) {
^
1 error
I also experience this with the jobdone module when there are too many statements.hi
is there a sub limit i can use in debug mode?
i have a sub that includes all my levels and it has around 800 lines. running it on debug mode give me an error:
on release its working. is it possible to remove that limit?
PS: i am not using Try Catch at all in my code so i dont understand why its saying to large for Try Catch statement
I also experience this with the jobdone module when there are too many statements.
You can divide the sub to 2 for example if your sub name is mysub create another sub named mysub2 , move the half of the levels to mysub2 and at the end of the sub mysub add mysub2
so that your sub will be divided to 2 but they will run like one sub.
but they will run like one sub
Why is that ? If you call sub1 it also calls sub2 at the end ?
The debugger adds all kinds of stuff in the Java process that runs on the PC. Very large subs, especially when developers put data inside the code (which is not a good idea), can push it over the limit of local fields.Solving the issue is not the problem i just wonder why there is that limit.
Sub loadlevel(lv As Int)
If GameScene.IsInitialized Then
GameScene.RemoveAllChildren
GameScene.RemoveAllActions
csu.StopAll
End If
GameScene.PhysicsWorld.Gravity = Functions.CreateVector(0,0) 'reset gravity
'SETUPLEVEL RESET FIRST
allPhysicbodies.Clear
toolboxList.Clear
isPlaying = False
isPaused = False
dartGame = False
carGame = False
showStarScreen = False
dartCollidedWon = False
carcollideWon = False
BodyAlist.Clear
BodyBlist.Clear
starCount = 0
If lv > 13 Then
loadlevel2(lv) 'read from sub2 because of b4i limit!
Return
End If
Select lv
Case 1
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"gameback","gameback",vpW,vpH,vpW/2,vpH/2,-1,0,False,Null))
gameplay.Initialize("playgame")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(gameplay,"mainPlay","mainPlay",vpW*0.075,vpW*0.075,vpW*0.95,vpH*0.9,1,0,True,Null))
toolbox.Initialize("toolbox")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolbox,"toolbox","toolbox",vpW*0.075,vpW*0.075,vpW*0.85,vpH*0.9,1,0,True,Null))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.5,vpH*0.378,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.5,vpH*0.481,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.5,vpH*0.588,starCategory,ballBit+ballonBit+noContact,0))
boxtop.Initialize("boxtop")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(boxtop,"goalBasketBack","goalBasketBack",vpW*0.15,vpH*0.175,vpW*0.501,vpH*0.188,0,0,False,Null))
ball.Initialize("ball")
GameScene.AddChild(CreateNode.CreateBall(ball,"ball","basketBall",vpW*0.065,vpW*0.065,vpW*0.5,vpH*0.761,ballBit,boxbit+noContact,boxbit+noContact+starCategory))
box.Initialize("box")
GameScene.AddChild(CreateNode.CreateBox(box,"box","goalBasket",vpW*0.15,vpH*0.175,vpW*0.501,vpH*0.188,boxbit,ballBit+noContact,ballBit+noContact,1))
allPhysicbodies.Add(box)
allPhysicbodies.Add(ball)
BodyBlist.Add(box)
BodyAlist.Add(ball)
toolback.Initialize("toolback")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolback,"toolback","toolbox_background_scale",0,toolbox.Size.Height,toolbox.Position.x,toolbox.Position.y,0,0,False,Null))
updateToolbox(True)
Case 2
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"gameback","gameback",vpW,vpH,vpW/2,vpH/2,-1,0,False,Null))
gameplay.Initialize("playgame")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(gameplay,"mainPlay","mainPlay",vpW*0.075,vpW*0.075,vpW*0.95,vpH*0.9,1,0,True,Null))
toolbox.Initialize("toolbox")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolbox,"toolbox","toolbox",vpW*0.075,vpW*0.075,vpW*0.85,vpH*0.9,1,0,True,Null))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.44,vpH*0.538,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.361,vpH*0.538,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.516,vpH*0.538,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"shelfHint","shelfHint",vpW*0.215,vpH*0.084,vpW*0.44,vpH*0.442,0,360,False,Null))
boxtop.Initialize("boxtop")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(boxtop,"goalBasketBack","goalBasketBack",vpW*0.15,vpH*0.175,vpW*0.688,vpH*0.188,0,0,False,Null))
ball.Initialize("ball")
GameScene.AddChild(CreateNode.CreateBall(ball,"ball","basketBall",vpW*0.065,vpW*0.065,vpW*0.216,vpH*0.792,ballBit,boxbit+noContact,boxbit+noContact+starCategory))
box.Initialize("box")
GameScene.AddChild(CreateNode.CreateBox(box,"box","goalBasket",vpW*0.15,vpH*0.175,vpW*0.688,vpH*0.188,boxbit,ballBit+noContact,ballBit+noContact,1))
GameScene.AddChild(CreateNode.CreateShelf("shelf","shelf",vpW*0.215,vpH*0.084,vpW*0.213,vpH*0.517,340,True,noContact,noContact,7))
allPhysicbodies.Add(box)
allPhysicbodies.Add(ball)
BodyBlist.Add(box)
BodyAlist.Add(ball)
toolback.Initialize("toolback")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolback,"toolback","toolbox_background_scale",0,toolbox.Size.Height,toolbox.Position.x,toolbox.Position.y,0,0,False,Null))
'Name: shelf | Bitmap: shelf
Dim shelfT As SKSpriteNode
shelfT.Initialize("toolback")
toolboxList.Add(CreateNode.CreateToolBoxSknode(shelfT,"shelfT","shelf",1,vpW*0.12,vpW*0.035))
updateToolbox(True)
Case 3
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"gameback","gameback",vpW,vpH,vpW/2,vpH/2,-1,0,False,Null))
gameplay.Initialize("playgame")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(gameplay,"mainPlay","mainPlay",vpW*0.075,vpW*0.075,vpW*0.95,vpH*0.9,1,0,True,Null))
toolbox.Initialize("toolbox")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolbox,"toolbox","toolbox",vpW*0.075,vpW*0.075,vpW*0.85,vpH*0.9,1,0,True,Null))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.567,vpH*0.697,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.435,vpH*0.519,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.535,vpH*0.388,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"shelfHint","shelfHint",vpW*0.215,vpH*0.084,vpW*0.63,vpH*0.649,0,45,False,Null))
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"shelfHint","shelfHint",vpW*0.215,vpH*0.084,vpW*0.394,vpH*0.455,0,315,False,Null))
boxtop.Initialize("boxtop")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(boxtop,"goalBasketBack","goalBasketBack",vpW*0.15,vpH*0.175,vpW*0.551,vpH*0.188,0,0,False,Null))
ball.Initialize("ball")
GameScene.AddChild(CreateNode.CreateBall(ball,"ball","basketBall",vpW*0.065,vpW*0.065,vpW*0.569,vpH*0.861,ballBit,boxbit+noContact,boxbit+noContact+starCategory))
box.Initialize("box")
GameScene.AddChild(CreateNode.CreateBox(box,"box","goalBasket",vpW*0.15,vpH*0.175,vpW*0.551,vpH*0.188,boxbit,ballBit+noContact,ballBit+noContact,1))
allPhysicbodies.Add(box)
allPhysicbodies.Add(ball)
BodyBlist.Add(box)
BodyAlist.Add(ball)
toolback.Initialize("toolback")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolback,"toolback","toolbox_background_scale",0,toolbox.Size.Height,toolbox.Position.x,toolbox.Position.y,0,0,False,Null))
'Name: shelf | Bitmap: shelf
Dim shelfT As SKSpriteNode
shelfT.Initialize("toolback")
toolboxList.Add(CreateNode.CreateToolBoxSknode(shelfT,"shelfT","shelf",2,vpW*0.12,vpW*0.035))
updateToolbox(True)
Case 4
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"gameback","gameback",vpW,vpH,vpW/2,vpH/2,-1,0,False,Null))
gameplay.Initialize("playgame")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(gameplay,"mainPlay","mainPlay",vpW*0.075,vpW*0.075,vpW*0.95,vpH*0.9,1,0,True,Null))
toolbox.Initialize("toolbox")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolbox,"toolbox","toolbox",vpW*0.075,vpW*0.075,vpW*0.85,vpH*0.9,1,0,True,Null))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.65,vpH*0.394,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.38,vpH*0.603,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.652,vpH*0.269,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"shelf","shelf",vpW*0.215,vpH*0.084,vpW*0.821,vpH*0.746,0,360,False,Null))
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"bookSmall","bookSmall",vpW*0.014,vpH*0.094,vpW*0.847,vpH*0.828,0,360,False,Null))
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"bookBig","bookBig",vpW*0.018,vpH*0.125,vpW*0.88,vpH*0.844,0,360,False,Null))
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"bookMiddle","bookMiddle",vpW*0.018,vpH*0.125,vpW*0.863,vpH*0.844,0,360,False,Null))
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"bowlingPin","bowlingPin",vpW*0.039,vpH*0.163,vpW*0.768,vpH*0.862,0,360,False,Null))
boxtop.Initialize("boxtop")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(boxtop,"goalBasketBack","goalBasketBack",vpW*0.15,vpH*0.175,vpW*0.858,vpH*0.188,0,0,False,Null))
ball.Initialize("ball")
GameScene.AddChild(CreateNode.CreateBall(ball,"ball","basketBall",vpW*0.065,vpW*0.065,vpW*0.184,vpH*0.858,ballBit,boxbit+noContact,boxbit+noContact+starCategory))
box.Initialize("box")
GameScene.AddChild(CreateNode.CreateBox(box,"box","goalBasket",vpW*0.15,vpH*0.175,vpW*0.858,vpH*0.188,boxbit,ballBit+noContact,ballBit+noContact,1))
GameScene.AddChild(CreateNode.CreateShelf("shelf","shelf",vpW*0.215,vpH*0.084,vpW*0.384,vpH*0.508,360,True,noContact,noContact,7))
GameScene.AddChild(CreateNode.CreateTrampoline("trampoline","trampoline",vpW*0.07,vpH*0.062,vpW*0.651,vpH*0.144,360,True,noContact,noContact,7))
allPhysicbodies.Add(box)
allPhysicbodies.Add(ball)
BodyBlist.Add(box)
BodyAlist.Add(ball)
toolback.Initialize("toolback")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolback,"toolback","toolbox_background_scale",0,toolbox.Size.Height,toolbox.Position.x,toolbox.Position.y,0,0,False,Null))
'Name: shelf | Bitmap: shelf
Dim shelfT As SKSpriteNode
shelfT.Initialize("toolback")
toolboxList.Add(CreateNode.CreateToolBoxSknode(shelfT,"shelfT","shelf",1,vpW*0.12,vpW*0.035))
updateToolbox(True)
Case 5
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"gameback","gameback",vpW,vpH,vpW/2,vpH/2,-1,0,False,Null))
gameplay.Initialize("playgame")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(gameplay,"mainPlay","mainPlay",vpW*0.075,vpW*0.075,vpW*0.95,vpH*0.9,1,0,True,Null))
toolbox.Initialize("toolbox")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolbox,"toolbox","toolbox",vpW*0.075,vpW*0.075,vpW*0.85,vpH*0.9,1,0,True,Null))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.254,vpH*0.566,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.563,vpH*0.722,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.666,vpH*0.594,starCategory,ballBit+ballonBit+noContact,0))
boxtop.Initialize("boxtop")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(boxtop,"goalBasketBack","goalBasketBack",vpW*0.15,vpH*0.175,vpW*0.8,vpH*0.188,0,0,False,Null))
ball.Initialize("ball")
GameScene.AddChild(CreateNode.CreateBall(ball,"ball","billardBall",vpW*0.035,vpW*0.035,vpW*0.473,vpH*0.791,ballBit,boxbit+noContact,boxbit+noContact+starCategory))
box.Initialize("box")
GameScene.AddChild(CreateNode.CreateBox(box,"box","goalBasket",vpW*0.15,vpH*0.175,vpW*0.8,vpH*0.188,boxbit,ballBit+noContact,ballBit+noContact,1))
GameScene.AddChild(CreateNode.CreateBalloon(Null,"balloon","balloon",vpW*0.07,vpH*0.188,vpW*0.253,vpH*0.334,360,True,noContact,noContact,7))
GameScene.AddChild(CreateNode.CreateDynamicBalls("ball","basketBall",vpW*0.065,vpW*0.065,vpW*0.305,vpH*0.817,360,True,noContact,noContact,7))
GameScene.AddChild(CreateNode.CreateShelf("shelf","shelf",vpW*0.215,vpH*0.084,vpW*0.402,vpH*0.721,360,True,noContact,noContact,7))
allPhysicbodies.Add(box)
allPhysicbodies.Add(ball)
BodyBlist.Add(box)
BodyAlist.Add(ball)
toolback.Initialize("toolback")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolback,"toolback","toolbox_background_scale",0,toolbox.Size.Height,toolbox.Position.x,toolbox.Position.y,0,0,False,Null))
'Name: shelf | Bitmap: shelf
Dim shelfT As SKSpriteNode
shelfT.Initialize("toolback")
toolboxList.Add(CreateNode.CreateToolBoxSknode(shelfT,"shelfT","shelf",1,vpW*0.12,vpW*0.035))
updateToolbox(True)
Case 6
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"gameback","gameback",vpW,vpH,vpW/2,vpH/2,-1,0,False,Null))
gameplay.Initialize("playgame")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(gameplay,"mainPlay","mainPlay",vpW*0.075,vpW*0.075,vpW*0.95,vpH*0.9,1,0,True,Null))
toolbox.Initialize("toolbox")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolbox,"toolbox","toolbox",vpW*0.075,vpW*0.075,vpW*0.85,vpH*0.9,1,0,True,Null))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.47,vpH*0.803,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.535,vpH*0.478,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.69,vpH*0.734,starCategory,ballBit+ballonBit+noContact,0))
balloon.Initialize("balloon")
GameScene.AddChild(CreateNode.CreateBalloon(balloon,"balloon","balloon",vpW*0.07,vpH*0.188,vpW*0.408,vpH*0.265,360,True,ballonBit,boxbit+noContact+ballBit+dartbit+starCategory,ballBit+noContact+dartbit))
dartGame = True
dart.Initialize("dartArrow")
GameScene.AddChild(CreateNode.CreateDartArrow(dart,"dartArrow","dartArrow",vpW*0.088,vpH*0.069,vpW*0.312,vpH*0.875,160,True,dartbit,ballonBit+boxbit+noContact+ballBit+starCategory,ballonBit))
GameScene.AddChild(CreateNode.CreateShelf("shelf","shelf",vpW*0.215,vpH*0.084,vpW*0.527,vpH*0.555,190,True,noContact,noContact,7))
allPhysicbodies.Add(balloon)
allPhysicbodies.Add(dart)
BodyAlist.Add(balloon)
BodyBlist.Add(dart)
toolback.Initialize("toolback")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolback,"toolback","toolbox_background_scale",0,toolbox.Size.Height,toolbox.Position.x,toolbox.Position.y,0,0,False,Null))
'Name: shelf | Bitmap: shelf
Dim shelfT As SKSpriteNode
shelfT.Initialize("toolback")
toolboxList.Add(CreateNode.CreateToolBoxSknode(shelfT,"shelfT","shelf",3,vpW*0.12,vpW*0.035))
updateToolbox(True)
Case 7
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"gameback","gameback",vpW,vpH,vpW/2,vpH/2,-1,0,False,Null))
gameplay.Initialize("playgame")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(gameplay,"mainPlay","mainPlay",vpW*0.075,vpW*0.075,vpW*0.95,vpH*0.9,1,0,True,Null))
toolbox.Initialize("toolbox")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolbox,"toolbox","toolbox",vpW*0.075,vpW*0.075,vpW*0.85,vpH*0.9,1,0,True,Null))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.252,vpH*0.544,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.588,vpH*0.375,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.734,vpH*0.375,starCategory,ballBit+ballonBit+noContact,0))
boxtop.Initialize("boxtop")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(boxtop,"goalBasketBack","goalBasketBack",vpW*0.15,vpH*0.175,vpW*0.848,vpH*0.188,0,0,False,Null))
ball.Initialize("ball")
GameScene.AddChild(CreateNode.CreateBall(ball,"ball","basketBall",vpW*0.065,vpW*0.065,vpW*0.318,vpH*0.551,ballBit,boxbit+noContact,boxbit+noContact+starCategory))
box.Initialize("box")
GameScene.AddChild(CreateNode.CreateBox(box,"box","goalBasket",vpW*0.15,vpH*0.175,vpW*0.848,vpH*0.188,boxbit,ballBit+noContact,ballBit+noContact,1))
GameScene.AddChild(CreateNode.CreateDartArrow(Null,"dart","dartArrow",vpW*0.088,vpH*0.069,vpW*0.224,vpH*0.856,90,True,noContact,noContact,7))
GameScene.AddChild(CreateNode.CreateBigBox("crateBig","crateBig",vpW*0.114,vpH*0.188,vpW*0.363,vpH*0.206,360,True,noContact,noContact,7))
GameScene.AddChild(CreateNode.CreateBigBox("crateBig","crateBig",vpW*0.114,vpH*0.188,vpW*0.362,vpH*0.397,360,True,noContact,noContact,7))
allPhysicbodies.Add(box)
allPhysicbodies.Add(ball)
BodyBlist.Add(box)
BodyAlist.Add(ball)
toolback.Initialize("toolback")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolback,"toolback","toolbox_background_scale",0,toolbox.Size.Height,toolbox.Position.x,toolbox.Position.y,0,0,False,Null))
'Name: balloon | Bitmap: balloon
Dim balloonT As SKSpriteNode
balloonT.Initialize("toolback")
toolboxList.Add(CreateNode.CreateToolBoxSknode(balloonT,"balloonT","balloon",1,vpW*0.035,vpW*0.05))
'Name: trampoline | Bitmap: trampoline
Dim trampolineT As SKSpriteNode
trampolineT.Initialize("toolback")
toolboxList.Add(CreateNode.CreateToolBoxSknode(trampolineT,"trampolineT","trampoline",2,vpW*0.065,vpW*0.035))
updateToolbox(True)
Case 8
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"gameback","gameback",vpW,vpH,vpW/2,vpH/2,-1,0,False,Null))
gameplay.Initialize("playgame")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(gameplay,"mainPlay","mainPlay",vpW*0.075,vpW*0.075,vpW*0.95,vpH*0.9,1,0,True,Null))
toolbox.Initialize("toolbox")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolbox,"toolbox","toolbox",vpW*0.075,vpW*0.075,vpW*0.85,vpH*0.9,1,0,True,Null))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.597,vpH*0.3,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.454,vpH*0.3,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.324,vpH*0.3,starCategory,ballBit+ballonBit+noContact,0))
boxtop.Initialize("boxtop")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(boxtop,"goalBasketBack","goalBasketBack",vpW*0.15,vpH*0.175,vpW*0.205,vpH*0.188,0,0,False,Null))
ball.Initialize("ball")
GameScene.AddChild(CreateNode.CreateBall(ball,"ball","billardBall",vpW*0.035,vpW*0.035,vpW*0.192,vpH*0.881,ballBit,boxbit+noContact,boxbit+noContact+starCategory))
box.Initialize("box")
GameScene.AddChild(CreateNode.CreateBox(box,"box","goalBasket",vpW*0.15,vpH*0.175,vpW*0.205,vpH*0.188,boxbit,ballBit+noContact,ballBit+noContact,1))
GameScene.AddChild(CreateNode.CreateShelf("shelf","shelf",vpW*0.215,vpH*0.084,vpW*0.734,vpH*0.361,25,True,noContact,noContact,7))
allPhysicbodies.Add(box)
allPhysicbodies.Add(ball)
BodyBlist.Add(box)
BodyAlist.Add(ball)
toolback.Initialize("toolback")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolback,"toolback","toolbox_background_scale",0,toolbox.Size.Height,toolbox.Position.x,toolbox.Position.y,0,0,False,Null))
'Name: pipeStraight | Bitmap: pipeStraight
Dim pipeStraightT As SKSpriteNode
pipeStraightT.Initialize("toolback")
toolboxList.Add(CreateNode.CreateToolBoxSknode(pipeStraightT,"pipeStraightT","pipeStraight",2,vpW*0.105,vpW*0.045))
'Name: pipeCurve | Bitmap: pipeCurve
Dim pipeCurveT As SKSpriteNode
pipeCurveT.Initialize("toolback")
toolboxList.Add(CreateNode.CreateToolBoxSknode(pipeCurveT,"pipeCurveT","pipeCurve",2,vpW*0.045,vpW*0.045))
'Name: trampoline | Bitmap: trampoline
Dim trampolineT As SKSpriteNode
trampolineT.Initialize("toolback")
toolboxList.Add(CreateNode.CreateToolBoxSknode(trampolineT,"trampolineT","trampoline",2,vpW*0.065,vpW*0.035))
updateToolbox(True)
Case 9
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"stage5","stage5",vpW,vpH,vpW/2,vpH/2,-1,0,False,Null))
gameplay.Initialize("playgame")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(gameplay,"mainPlay","mainPlay",vpW*0.075,vpW*0.075,vpW*0.95,vpH*0.9,1,0,True,Null))
toolbox.Initialize("toolbox")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolbox,"toolbox","toolbox",vpW*0.075,vpW*0.075,vpW*0.85,vpH*0.9,1,0,True,Null))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.644,vpH*0.71,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.382,vpH*0.803,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.88,vpH*0.375,starCategory,ballBit+ballonBit+noContact,0))
boxtop.Initialize("boxtop")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(boxtop,"goalBasketBack","goalBasketBack",vpW*0.15,vpH*0.175,vpW*0.73,vpH*0.188,0,0,False,Null))
ball.Initialize("ball")
GameScene.AddChild(CreateNode.CreateBall(ball,"ball","billardBall",vpW*0.035,vpW*0.035,vpW*0.579,vpH*0.703,ballBit,boxbit+noContact,boxbit+noContact+starCategory))
box.Initialize("box")
GameScene.AddChild(CreateNode.CreateBox(box,"box","goalBasket",vpW*0.15,vpH*0.175,vpW*0.73,vpH*0.188,boxbit,ballBit+noContact,ballBit+noContact,1))
GameScene.AddChild(CreateNode.CreateShelf("shelf","shelf",vpW*0.215,vpH*0.084,vpW*0.586,vpH*0.63,360,True,noContact,noContact,7))
GameScene.AddChild(CreateNode.CreateDynamicBalls("ball","basketBall",vpW*0.065,vpW*0.065,vpW*0.265,vpH*0.817,360,True,noContact,noContact,7))
GameScene.AddChild(CreateNode.CreateShelf("shelf","shelf",vpW*0.215,vpH*0.084,vpW*0.363,vpH*0.721,360,True,noContact,noContact,7))
allPhysicbodies.Add(box)
allPhysicbodies.Add(ball)
BodyBlist.Add(box)
BodyAlist.Add(ball)
toolback.Initialize("toolback")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolback,"toolback","toolbox_background_scale",0,toolbox.Size.Height,toolbox.Position.x,toolbox.Position.y,0,0,False,Null))
'Name: pipeCurve | Bitmap: pipeCurve
Dim pipeCurveT As SKSpriteNode
pipeCurveT.Initialize("toolback")
toolboxList.Add(CreateNode.CreateToolBoxSknode(pipeCurveT,"pipeCurveT","pipeCurve",1,vpW*0.045,vpW*0.045))
'Name: trampoline | Bitmap: trampoline
Dim trampolineT As SKSpriteNode
trampolineT.Initialize("toolback")
toolboxList.Add(CreateNode.CreateToolBoxSknode(trampolineT,"trampolineT","trampoline",1,vpW*0.065,vpW*0.035))
'Name: balloon | Bitmap: balloon
Dim balloonT As SKSpriteNode
balloonT.Initialize("toolback")
toolboxList.Add(CreateNode.CreateToolBoxSknode(balloonT,"balloonT","balloon",1,vpW*0.035,vpW*0.05))
updateToolbox(True)
Case 10
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"stage5","stage5",vpW,vpH,vpW/2,vpH/2,-1,0,False,Null))
gameplay.Initialize("playgame")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(gameplay,"mainPlay","mainPlay",vpW*0.075,vpW*0.075,vpW*0.95,vpH*0.9,1,0,True,Null))
toolbox.Initialize("toolbox")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolbox,"toolbox","toolbox",vpW*0.075,vpW*0.075,vpW*0.85,vpH*0.9,1,0,True,Null))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.363,vpH*0.328,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.748,vpH*0.622,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.639,vpH*0.447,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"shelf","shelf",vpW*0.215,vpH*0.084,vpW*0.176,vpH*0.742,0,360,False,Null))
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"bowlingBall","bowlingBall",vpW*0.062,vpH*0.109,vpW*0.124,vpH*0.833,0,360,False,Null))
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"bookMiddle","bookMiddle",vpW*0.018,vpH*0.125,vpW*0.208,vpH*0.844,0,360,False,Null))
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"bookSmall","bookSmall",vpW*0.014,vpH*0.094,vpW*0.227,vpH*0.825,0,360,False,Null))
boxtop.Initialize("boxtop")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(boxtop,"goalBasketBack","goalBasketBack",vpW*0.15,vpH*0.175,vpW*0.353,vpH*0.188,0,0,False,Null))
box.Initialize("box")
GameScene.AddChild(CreateNode.CreateBox(box,"box","goalBasket",vpW*0.15,vpH*0.175,vpW*0.353,vpH*0.188,boxbit,ballBit+noContact,ballBit+noContact,1))
bowlingPin.Initialize("bowlingPin")
GameScene.AddChild(CreateNode.createBowlingPin(bowlingPin,"bowlingPin","bowlingPin",vpW*0.039,vpH*0.163,vpW*0.491,vpH*0.381,360,True,ballBit,boxbit+noContact+starCategory,boxbit+noContact))
GameScene.AddChild(CreateNode.CreateDynamicBalls("ball","tennisBall",vpW*0.042,vpW*0.042,vpW*0.572,vpH*0.838,360,True,noContact,noContact,7))
GameScene.AddChild(CreateNode.CreateBigBox("crateBig","crateBig",vpW*0.114,vpH*0.188,vpW*0.506,vpH*0.203,360,True,noContact,noContact,7))
allPhysicbodies.Add(box)
allPhysicbodies.Add(bowlingPin)
BodyBlist.Add(box)
BodyAlist.Add(bowlingPin)
toolback.Initialize("toolback")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolback,"toolback","toolbox_background_scale",0,toolbox.Size.Height,toolbox.Position.x,toolbox.Position.y,0,0,False,Null))
'Name: pipeCurve | Bitmap: pipeCurve
Dim pipeCurveT As SKSpriteNode
pipeCurveT.Initialize("toolback")
toolboxList.Add(CreateNode.CreateToolBoxSknode(pipeCurveT,"pipeCurveT","pipeCurve",1,vpW*0.045,vpW*0.045))
'Name: trampoline | Bitmap: trampoline
Dim trampolineT As SKSpriteNode
trampolineT.Initialize("toolback")
toolboxList.Add(CreateNode.CreateToolBoxSknode(trampolineT,"trampolineT","trampoline",1,vpW*0.065,vpW*0.035))
updateToolbox(True)
Case 11
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"stage5","stage5",vpW,vpH,vpW/2,vpH/2,-1,0,False,Null))
gameplay.Initialize("playgame")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(gameplay,"mainPlay","mainPlay",vpW*0.075,vpW*0.075,vpW*0.95,vpH*0.9,1,0,True,Null))
toolbox.Initialize("toolbox")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolbox,"toolbox","toolbox",vpW*0.075,vpW*0.075,vpW*0.85,vpH*0.9,1,0,True,Null))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.604,vpH*0.781,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.35,vpH*0.197,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.194,vpH*0.197,starCategory,ballBit+ballonBit+noContact,0))
carGame = True
car.Initialize("rcCar")
GameScene.AddChild(CreateNode.CreateCar(car,"rcCar","rcCar",vpW*0.158,vpH*0.219,vpW*0.54,vpH*0.212,360,True,ballBit,boxbit+noContact+starCategory,boxbit+noContact))
GameScene.AddChild(CreateNode.CreateCarRC("rcCarControl","rcCarControl",vpW*0.079,vpH*0.172,vpW*0.788,vpH*0.526,360,True,noContact,noContact,7))
GameScene.AddChild(CreateNode.CreateShelf("shelf","shelf",vpW*0.215,vpH*0.084,vpW*0.769,vpH*0.405,360,True,noContact,noContact,7))
GameScene.AddChild(CreateNode.createBook(Null,"bookMiddle","bookMiddle",vpW*0.018,vpH*0.125,vpW*0.736,vpH*0.509,360,True,noContact,noContact,7))
GameScene.AddChild(CreateNode.createBook(Null,"bookBig","bookBig",vpW*0.018,vpH*0.125,vpW*0.84,vpH*0.509,360,True,noContact,noContact,7))
GameScene.AddChild(CreateNode.CreateDynamicBalls("ball","tennisBall",vpW*0.042,vpW*0.042,vpW*0.35,vpH*0.881,360,True,noContact,noContact,7))
allPhysicbodies.Add(car)
BodyAlist.Add(car)
toolback.Initialize("toolback")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolback,"toolback","toolbox_background_scale",0,toolbox.Size.Height,toolbox.Position.x,toolbox.Position.y,0,0,False,Null))
'Name: pipeCurve | Bitmap: pipeCurve
Dim pipeCurveT As SKSpriteNode
pipeCurveT.Initialize("toolback")
toolboxList.Add(CreateNode.CreateToolBoxSknode(pipeCurveT,"pipeCurveT","pipeCurve",1,vpW*0.045,vpW*0.045))
'Name: shelf | Bitmap: shelf
Dim shelfT As SKSpriteNode
shelfT.Initialize("toolback")
toolboxList.Add(CreateNode.CreateToolBoxSknode(shelfT,"shelfT","shelf",2,vpW*0.12,vpW*0.035))
updateToolbox(True)
Case 12
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"stage5","stage5",vpW,vpH,vpW/2,vpH/2,-1,0,False,Null))
gameplay.Initialize("playgame")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(gameplay,"mainPlay","mainPlay",vpW*0.075,vpW*0.075,vpW*0.95,vpH*0.9,1,0,True,Null))
toolbox.Initialize("toolbox")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolbox,"toolbox","toolbox",vpW*0.075,vpW*0.075,vpW*0.85,vpH*0.9,1,0,True,Null))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.257,vpH*0.631,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.456,vpH*0.241,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.46,vpH*0.406,starCategory,ballBit+ballonBit+noContact,0))
boxtop.Initialize("boxtop")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(boxtop,"goalBasketBack","goalBasketBack",vpW*0.15,vpH*0.175,vpW*0.318,vpH*0.188,0,0,False,Null))
ball.Initialize("ball")
GameScene.AddChild(CreateNode.CreateBall(ball,"ball","basketBall",vpW*0.065,vpW*0.065,vpW*0.562,vpH*0.517,ballBit,boxbit+noContact,boxbit+noContact+starCategory))
box.Initialize("box")
GameScene.AddChild(CreateNode.CreateBox(box,"box","goalBasket",vpW*0.15,vpH*0.175,vpW*0.318,vpH*0.188,boxbit,ballBit+noContact,ballBit+noContact,1))
GameScene.AddChild(CreateNode.CreateCarRC("rcCarControl","rcCarControl",vpW*0.079,vpH*0.172,vpW*0.071,vpH*0.38,360,True,noContact,noContact,7))
GameScene.AddChild(CreateNode.CreateCar(Null,"rcCar","rcCar",vpW*0.158,vpH*0.219,vpW*0.912,vpH*0.647,360,True,noContact,noContact,7))
GameScene.AddChild(CreateNode.CreateShelf("shelf","shelf",vpW*0.215,vpH*0.084,vpW*0.632,vpH*0.42,360,True,noContact,noContact,7))
GameScene.AddChild(CreateNode.CreateDynamicBalls("ball","tennisBall",vpW*0.042,vpW*0.042,vpW*0.188,vpH*0.872,360,True,noContact,noContact,7))
GameScene.AddChild(CreateNode.CreateShelf("shelf","shelf",vpW*0.215,vpH*0.084,vpW*0.866,vpH*0.499,360,True,noContact,noContact,7))
GameScene.AddChild(CreateNode.createBowlingPin(Null,"bowlingPin","bowlingPin",vpW*0.039,vpH*0.163,vpW*0.777,vpH*0.625,360,True,noContact,noContact,7))
GameScene.AddChild(CreateNode.CreateBigBox("crateBig","crateBig",vpW*0.114,vpH*0.188,vpW*0.071,vpH*0.203,360,True,noContact,noContact,7))
allPhysicbodies.Add(box)
allPhysicbodies.Add(ball)
BodyBlist.Add(box)
BodyAlist.Add(ball)
toolback.Initialize("toolback")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolback,"toolback","toolbox_background_scale",0,toolbox.Size.Height,toolbox.Position.x,toolbox.Position.y,0,0,False,Null))
'Name: shelf | Bitmap: shelf
Dim shelfT As SKSpriteNode
shelfT.Initialize("toolback")
toolboxList.Add(CreateNode.CreateToolBoxSknode(shelfT,"shelfT","shelf",2,vpW*0.12,vpW*0.035))
'Name: trampoline | Bitmap: trampoline
Dim trampolineT As SKSpriteNode
trampolineT.Initialize("toolback")
toolboxList.Add(CreateNode.CreateToolBoxSknode(trampolineT,"trampolineT","trampoline",1,vpW*0.065,vpW*0.035))
'Name: bookMiddle | Bitmap: bookMiddle
Dim bookMiddleT As SKSpriteNode
bookMiddleT.Initialize("toolback")
toolboxList.Add(CreateNode.CreateToolBoxSknode(bookMiddleT,"bookMiddleT","bookMiddle",1,vpW*0.02,vpW*0.055))
'Name: bookBig | Bitmap: bookBig
Dim bookBigT As SKSpriteNode
bookBigT.Initialize("toolback")
toolboxList.Add(CreateNode.CreateToolBoxSknode(bookBigT,"bookBigT","bookBig",1,vpW*0.02,vpW*0.055))
updateToolbox(True)
Case 13
GameScene.AddChild(CreateNode.CreateSKSpriteNode(Null,"stage5","stage5",vpW,vpH,vpW/2,vpH/2,-1,0,False,Null))
gameplay.Initialize("playgame")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(gameplay,"mainPlay","mainPlay",vpW*0.075,vpW*0.075,vpW*0.95,vpH*0.9,1,0,True,Null))
toolbox.Initialize("toolbox")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolbox,"toolbox","toolbox",vpW*0.075,vpW*0.075,vpW*0.85,vpH*0.9,1,0,True,Null))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.428,vpH*0.516,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.363,vpH*0.825,starCategory,ballBit+ballonBit+noContact,0))
GameScene.AddChild(CreateNode.CreateStar("star",vpW*0.046,vpW*0.046,vpW*0.836,vpH*0.585,starCategory,ballBit+ballonBit+noContact,0))
boxtop.Initialize("boxtop")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(boxtop,"goalBasketBack","goalBasketBack",vpW*0.15,vpH*0.175,vpW*0.103,vpH*0.188,0,0,False,Null))
box.Initialize("box")
GameScene.AddChild(CreateNode.CreateBox(box,"box","goalBasket",vpW*0.15,vpH*0.175,vpW*0.103,vpH*0.188,boxbit,ballBit+noContact,ballBit+noContact,1))
bowlingPin.Initialize("bowlingPin")
GameScene.AddChild(CreateNode.createBowlingPin(bowlingPin,"bowlingPin","bowlingPin",vpW*0.039,vpH*0.163,vpW*0.254,vpH*0.484,360,True,ballBit,boxbit+noContact+starCategory,boxbit+noContact))
GameScene.AddChild(CreateNode.CreateDynamicBalls("ball","bowlingBall",vpW*0.062,vpW*0.062,vpW*0.156,vpH*0.88,360,True,noContact,noContact,7))
GameScene.AddChild(CreateNode.CreateBigBox("crateBig","crateBig",vpW*0.114,vpH*0.188,vpW*0.254,vpH*0.203,360,True,noContact,noContact,7))
GameScene.AddChild(CreateNode.CreateChair("chair","chair",vpW*0.056,vpH*0.1,vpW*0.253,vpH*0.35,360,True,noContact,noContact,7))
allPhysicbodies.Add(box)
allPhysicbodies.Add(bowlingPin)
BodyBlist.Add(box)
BodyAlist.Add(bowlingPin)
toolback.Initialize("toolback")
GameScene.AddChild(CreateNode.CreateSKSpriteNode(toolback,"toolback","toolbox_background_scale",0,toolbox.Size.Height,toolbox.Position.x,toolbox.Position.y,0,0,False,Null))
'Name: shelf | Bitmap: shelf
Dim shelfT As SKSpriteNode
shelfT.Initialize("toolback")
toolboxList.Add(CreateNode.CreateToolBoxSknode(shelfT,"shelfT","shelf",6,vpW*0.12,vpW*0.035))
updateToolbox(True)
End Select
End Sub 'End LoadLevel Sub
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?