A
A
Anzorika2019-09-28 17:47:29
JavaScript
Anzorika, 2019-09-28 17:47:29

Hello, how can I make sure that when pushing there are indents from objects, for example 200px?

Hello, how can I make sure that when pushing there are indents from objects, for example 200px ?
Well, let's say squares are being generated) and I want to make sure that there are indents between them by x

this.generation++;

            if(this.generation%10==0){
            		if(this.plat.length < 13){
            			this.plat.push({x : Math.random() * canvas.width / 2, y : 750, w:350, h:190});
            		}
            }

My code

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question