1 Star 0 Fork 7

新仅可/模拟虫群(Swarm Simulator)

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
kongregate_shell.html 2.53 KB
一键复制 编辑 原始数据 按行查看 历史
Evan 提交于 2019-06-12 15:35 . Updates
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Swarm Simulator</title> <!-- Load the Kongregate Javascript API --> <script type="text/javascript" src="//www.kongregate.com/javascripts/kongregate_api.js"></script> <!-- Give the shell no border/scroll bars and match the Kongregate background color.
If your game needs scrollbars, you might need to modify these styles --> <style type="text/css"> html{border: none; overflow: hidden; background-color: #333; height: 100%;}
body{border: none; background-color: #333;margin:0; padding:0; height:100%;} </style> </head> <body> <script type="text/javascript"> // Called when the API is finished loading
function onLoadCompleted(){
// Get a global reference to the kongregate API. This way, pages included in the
// iframe can access it by using "parent.kongregate"
kongregate = kongregateAPI.getAPI();
// Embed the game into the "contentdiv" div, which is defined below. You can also
// manually create your own iframe, this function is just for convenience.
// This example also passes along the kongregate user_id and game_auth_token so
// that the page can use them for authentication.
var params = "kongregate_user_id=" + kongregate.services.getUserId() +
"&kongregate_username=" + kongregate.services.getUsername() +
"&kongregate_game_auth_token=" + kongregate.services.getGameAuthToken() +
"&random=" + (Math.random() * 1000000000); // cache buster
setIFrame(params);
}
function setIFrame(params) {
//kongregateAPI.embedFrame("index.html?kongregate=1&" + params, 'contentdiv');
document.getElementById('iframedesu').src = ("index.html?kongregate=1&" + params + '#/');
}
// Begin the process of loading the Kongregate API:
kongregateAPI.loadAPI(onLoadCompleted);
// If it can't load for some reason, the game should still work </script> <!-- The div that the game will be placed into. Make sure to set the width and height properly --> <!--div id="contentdiv" style="top:0px; left:0px; width:800px; height:600px; borders:none;"--> <!-- You can manually put your game iframe in here instead of calling embedFrame above if you wish --> <!--/div--> <iframe id="iframedesu" src="index.html?kongregate=1" style="border: none; margin:0; padding:0;width:100%;height:100%;min-height:600px"></iframe>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xinjinke/swarmsim.git
git@gitee.com:xinjinke/swarmsim.git
xinjinke
swarmsim
模拟虫群(Swarm Simulator)
master

搜索帮助