HTML游戏开发
一, 寻找不同颜色游戏 代码参考: index.html文件: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,user-scalable=no"> <script src="easeljs.min.js"></script> <script src="Rect.js"></script> <link rel="stylesheet" type="text/css" href="style.css"> <title>Title</title> </head> <body> <div class="main"> <canvas id="gameView"></canvas> </div> <script src="app.js"></script> </body> </html> app.js文件: function Rect(n, color, Rectcolor) { createjs.Shape.call(this); this.setRectType = function (type) { this._RectType = type; switch (type) { case 1: this