HTML5-游戏:每个程序员都有一个梦想的游戏,手推HTML 5游戏集,枯燥的过程

  • L8_112627
    了解作者
  • 55.2MB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-15 09:05
    上传日期
HTML5-游戏 Cococs创作者&&白鹭(湖岸)&& Create.js && Phaser.js 可可创作者 基础教程代码合集,刮刮卡,摇杆,一笔画,跳一跳,摄像机追随。 白鹭&&湖岸 Egret2d:足球竞猜,瓶子工厂,别踩白块,成语大挑战,极速飞车,七彩贪吃蛇,时间大师。 Lakeshore:前线狙击,星座瞄准,单眼娃吃星星。 创建者JS 看你有多色,水果还是蔬菜,找国旗,划拳裁判长。 createjs-template(template):移动端拖拽,屏幕对齐处理,倒计时,序列祯操作,键盘事件,游戏预加载与游戏内部通信,碰撞检测,矩阵布局背景图 移相器 星星狗,小鸟蹦极,躲避外星人。
HTML5-Games-master.zip
内容介绍
(function outer(modules, cache, entry) { var previousRequire = "function" == typeof require && require; function newRequire(name, jumped) { var module = cache[name]; if (!module) { var moduleData = modules[name]; if (!moduleData) { var currentRequire = "function" == typeof require && require; if (!jumped && currentRequire) return currentRequire(name, true); if (previousRequire) return previousRequire(name, true); var err = new Error("Cannot find module '" + name + "'"); err.code = "MODULE_NOT_FOUND"; throw err; } var exports = {}; module = cache[name] = { exports: exports }; moduleData[0]((function(x) { return newRequire(moduleData[1][x] || x); }), module, exports); } return module.exports; } for (var i = 0; i < entry.length; i++) newRequire(entry[i]); return newRequire; })({ 1: [ (function(require, module, exports) { cc._LogInfos = cc._LogInfos || {}; var engineVersion; engineVersion = "1.8.1"; window["CocosEngine"] = cc.ENGINE_VERSION = engineVersion; cc._renderContext = null; cc._supportRender = false; cc._canvas = null; cc.container = null; cc._gameDiv = null; require("./cocos2d/core/utils"); require("./cocos2d/core/platform/CCSys"); var _engineInitCalled = false, _engineLoadedCallback = null; cc._engineLoaded = false; function _determineRenderType(config) { var CONFIG_KEY = cc.game.CONFIG_KEY, userRenderMode = parseInt(config[CONFIG_KEY.renderMode]) || 0; (isNaN(userRenderMode) || userRenderMode > 2 || userRenderMode < 0) && (config[CONFIG_KEY.renderMode] = 0); cc._renderType = cc.game.RENDER_TYPE_CANVAS; cc._supportRender = false; if (0 === userRenderMode) { if (cc.sys.capabilities["opengl"]) { cc._renderType = cc.game.RENDER_TYPE_WEBGL; cc._supportRender = true; } else if (cc.sys.capabilities["canvas"]) { cc._renderType = cc.game.RENDER_TYPE_CANVAS; cc._supportRender = true; } } else if (1 === userRenderMode && cc.sys.capabilities["canvas"]) { cc._renderType = cc.game.RENDER_TYPE_CANVAS; cc._supportRender = true; } else if (2 === userRenderMode && cc.sys.capabilities["opengl"]) { cc._renderType = cc.game.RENDER_TYPE_WEBGL; cc._supportRender = true; } } function _afterEngineLoaded() { cc._engineLoaded = true; false; console.log(cc.ENGINE_VERSION); _engineLoadedCallback && _engineLoadedCallback(); } function _windowLoaded() { window.removeEventListener("load", _windowLoaded, false); _afterEngineLoaded(); } cc.initEngine = function(config, cb) { if (_engineInitCalled) { var previousCallback = _engineLoadedCallback; _engineLoadedCallback = function() { previousCallback && previousCallback(); cb && cb(); }; return; } _engineLoadedCallback = cb; !cc.game.config && config ? cc.game.config = config : cc.game.config || cc.game._loadConfig(); config = cc.game.config; _determineRenderType(config); document.body ? _afterEngineLoaded() : window.addEventListener("load", _windowLoaded, false); _engineInitCalled = true; }; }), { "./cocos2d/core/platform/CCSys": 184, "./cocos2d/core/utils": 224 } ], 2: [ (function(require, module, exports) { var logList; var Enum = require("./cocos2d/core/platform/CCEnum"); cc.DebugMode = Enum({ NONE: 0, INFO: 1, WARN: 2, ERROR: 3, INFO_FOR_WEB_PAGE: 4, WARN_FOR_WEB_PAGE: 5, ERROR_FOR_WEB_PAGE: 6 }); cc._initDebugSetting = function(mode) { cc.log = cc.logID = cc.warn = cc.warnID = cc.error = cc.errorID = cc._throw = cc.assert = cc.assertID = function() {}; if (mode === cc.DebugMode.NONE) return; if (true, mode > cc.DebugMode.ERROR) (function() { function logToWebPage(msg) { if (!cc._canvas) return; if (!logList) { var logDiv = document.createElement("Div"); logDiv.setAttribute("id", "logInfoDiv"); logDiv.setAttribute("width", "200"); logDiv.setAttribute("height", cc._canvas.height); var logDivStyle = logDiv.style; logDivStyle.zIndex = "99999"; logDivStyle.position = "absolute"; logDivStyle.top = logDivStyle.left = "0"; logList = document.createElement("textarea"); logList.setAttribute("rows", "20"); logList.setAttribute("cols", "30"); logList.setAttribute("disabled", "true"); var logListStyle = logList.style; logListStyle.backgroundColor = "transparent"; logListStyle.borderBottom = "1px solid #cccccc"; logListStyle.borderTopWidth = logListStyle.borderLeftWidth = logListStyle.borderRightWidth = "0px"; logListStyle.borderTopStyle = logListStyle.borderLeftStyle = logListStyle.borderRightStyle = "none"; logListStyle.padding = "0px"; logListStyle.margin = 0; logDiv.appendChild(logList); cc._canvas.parentNode.appendChild(logDiv); } logList.value = logList.value + msg + "\r\n"; logList.scrollTop = logList.scrollHeight; } cc.error = function() { logToWebPage("ERROR : " + cc.js.formatStr.apply(null, arguments)); }; cc.assert = function(cond, msg) { "use strict"; if (!cond && msg) { msg = cc.js.formatStr.apply(null, cc.js.shiftArguments.apply(null, arguments)); logToWebPage("ASSERT: " + msg); } }; mode !== cc.DebugMode.ERROR_FOR_WEB_PAGE && (cc.warn = function() { logToWebPage("WARN : " + cc.js.formatStr.apply(null, arguments)); }); mode === cc.DebugMode.INFO_FOR_WEB_PAGE && (cc.log = cc.info = function() { logToWebPage(cc.js.formatStr.apply(null, arguments)); }); })(); else if (console && console.log.apply) { console.error || (console.error = console.log); console.warn || (console.warn = console.log); false; console.error.bind ? cc.error = console.error.bind(console) : cc.error = function() { return console.error.apply(console, arguments); }; cc.assert = function(cond, msg) { if (!cond) { msg && (msg = cc.js.formatStr.apply(null, cc.js.shiftArguments.apply(null, arguments))); false; false; throw new Error(msg); } }; } if (mode !== cc.DebugMode.ERROR) { false; console.warn.bind ? cc.warn = console.warn.bind(console) : cc.warn = function() { return console.warn.apply(console, arguments); }; } false; if (mode === cc.DebugMode.INFO) { false; console.log.bind ? cc.log = console.log.bind(console) : cc.log = function() { return console.log.apply(console, arguments); }; false; cc.info = function() { (console.info || console.log).apply(console, arguments); }; } cc.warnID = genLogFunc(cc.warn, "Warning"); cc.errorID = genLogFunc(cc.error, "Error"); cc.logID = genLogFunc(cc.log, "Log"); var assertFailed = genLogFunc((function() { var argsArr = [ false ]; for (var i = 0; i < arguments.length; ++i) argsArr.push(arguments[i]); cc.assert.apply(null, argsArr); }), "Assert"); cc.assertID = function(cond) { "use strict"; if (cond) return; assertFailed.apply(null, cc.js.shiftArguments.apply(null, arguments)); }; }; cc._throw = function(error) { var stack = error.stack; stack ? cc.error(stack) : cc.error(error); }; var e
评论
    相关推荐