See the Pen Practica Construcción de objetos by lTakisl (@ltakisl) on CodePen.
I know the code is fine but it wouldn’t give me the result, but I have a couple of questions:
Why do I have to add
//EvilCircle.prototype = Object.create (Shape.prototype);
EvilCircle.prototype.constructor = EvilCircle; / * * /
below the constructor of the EvilCircle (),
and the same for the constructor of the Ball ()?
Because I do it, what am I doing or enabling with it? I’m really lost with those two lines under the two constructors.
2.- If I press the keys a s w d the evil circle does not move, why?
3.- 3-the collision Detect () down, although when I saw the finished code I understand it, it did not occur to me, I had to copy it, which I was very discouraged, I felt like I did not really know what I was doing.
The same for point three of the score counter.
Not because it was difficult, but the fact of working with canvas confuses me a lot. Since I have not the slightest idea of this.
In short because I feel that I said little in everything I wrote if I had to write that code completely alone without help to make those animations with objects on canvas I would not know how to do it. And now I don’t know what to do, how to continue, whether to continue with the next program or what to read or reread or study before continuing and how.