https://www.w3schools.com/graphics/tryit.asp?filename=trygame_canvas
我正在查看上面链接中教程中的 js 代码,除了该行之外,我主要了解发生了什么
this.context = this.canvas.getContext("2d");
this.context 来自哪里?当然,“this”这个词是指 myGameArea 对象,然后 context 应该是 myGameArea 的某个属性,但尚未定义。任何帮助将不胜感激!