thanks! heres my grid! It's gorgeous!
If I have one object called enemy, how do I get/set position? I tried
runtime.objects.enemy.x,runtime.objects.enemy.y but it gives me undefined.
thanks!
runOnStartup(async runtime =>
{
runtime.addEventListener("beforeprojectstart",() => OnBeforeProjectStart(runtime));
});
function OnBeforeProjectStart(runtime)
{
runtime.layout.addEventListener("beforelayoutstart",() => OnBeforeLayoutStart(runtime));
}
function OnBeforeLayoutStart(runtime)
{
console.log(runtime.objects.enemy.x,runtime.objects.enemy.y);
for(var i = 0;i<10;i++){
for(var j = 0;j<10;j++){
runtime.objects.player.createInstance(0,i*32+32,j*32+32);
}
}
}