<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">


const scriptsInEvents = {

		async Egame_Event34_Act1(runtime, localVars)
		{
			var balls = runtime.objects.Ball.getAllInstances()
			
			var isAllInCup = true
			
			for(var i=0; i&lt;balls.length; i++){
			  if(balls[i].instVars.is_in_cup==0||balls[i].instVars.is_in_cup==2){
			  	isAllInCup = false
			  }
			}
			runtime.globalVars.isAllInCup = isAllInCup
		},

		async Elevels_Event5_Act1(runtime, localVars)
		{
			let levels = runtime.globalVars.countLevel
					
					for(var i=0; i &lt; levels; i++){
						let x= 44+ i%4 * 256
						let y=320 + Math.floor(i/4) * 256
						
						let button = runtime.objects.LevelsPlus.createInstance(1, x, y)
						if (i&lt;=runtime.globalVars.maxLevels){
							let text = runtime.objects.LevelText.createInstance(1, x, y)
						
							text.text = (i+1).toString()
							text.instVars.level = i;
						}
						button.instVars.level = i;
						if (i&lt;runtime.globalVars.maxLevels){
							button.animationFrame=1
						}
						if (i==runtime.globalVars.maxLevels){
							button.animationFrame=2
						}
					}
		},

		async Elevels_Event11_Act4(runtime, localVars)
		{
			if(runtime.globalVars.scrollStart+runtime.globalVars.scrollStep*2&gt;0){
				runtime.globalVars.scrollStep = runtime.globalVars.scrollStep - (runtime.globalVars.scrollStart+runtime.globalVars.scrollStep*2)/2
			}else if(runtime.globalVars.scrollStart+runtime.globalVars.scrollStep*2&lt;-runtime.globalVars.scrollMax){
				runtime.globalVars.scrollStep = 0
			}
		}

};

self.C3.ScriptsInEvents = scriptsInEvents;

</pre></body></html>