Skip to content

Commit e5edccd

Browse files
committed
reset world
1 parent 63cee9f commit e5edccd

10 files changed

Lines changed: 154 additions & 11 deletions

File tree

.idea/jsonSchemas.xml

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Examples/index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Title</title>
6+
</head>
7+
<body>
8+
<a href="Demo1">深度遍历树迷宫</a>
9+
<br>
10+
<a href="Demo2">双向冒泡排序</a>
11+
<br>
12+
<a href="Demo3">中缀转后缀表达式</a>
13+
<br>
14+
</body>
15+
</html>

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,8 @@ https://sucicada.github.io/Algorithm-PlayGround/dist/APG.js
3232

3333
## 使用在线地图编辑器
3434

35-
[APG MapEditor](https://sucicada.github.io/Algorithm-PlayGround/src/MapEditor/index.html)
35+
[APG MapEditor](https://sucicada.github.io/Algorithm-PlayGround/src/MapEditor/index.html)
36+
37+
## Demo 演示
38+
39+
https://sucicada.github.io/Algorithm-PlayGround/Examples/

docs/_sidebar.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
+ [Qucik-Start](/Quick-start/Quick-start.md)
22
+ [Developer Guide](how-to-make.md)
33
+ [游戏配置文件](config-js-Format.md)
4-
+ [地图元素映射表(blockMap)](block-map.md)
4+
+ [地图元素映射表(blockMap)](block-map.md)
5+

docs/block-map.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
# blockMap 地图元素映射表
2-
> 本配置文件用于地图配置文件生成阶段.
3-
> 关于地图配置文件如何生成,以及地图编辑器的使用详见[Quick-start 3.地图制作](Quick-start#3.地图制作)
2+
本配置文件用于地图配置文件生成阶段.
3+
4+
关于地图配置文件如何生成,以及地图编辑器的使用详见[Quick-start 3.地图制作](Quick-start#3.地图制作)
5+
6+
整个文件格式结构如下:
7+
```js
8+
var BLOCKS = {
9+
MapImg: {...},
10+
Layers: {
11+
TileLayer: [...],
12+
TargetLayer: [...],
13+
CharacterLayer: [...],
14+
}
15+
};
16+
```
417

518
## BLOCKS
619
本对象名以及内部所有键名不能改动, 否则就找不见你的地图元素了.

docs/config-js-Format.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,26 @@
1-
config-js
2-
---
1+
# 游戏配置文件
32

43
所有配置包含在`globalConfig`对象之下,
5-
请不要改变变量名
4+
请不要改变变量名
5+
6+
整个文件格式结构如下:
7+
```js
8+
var globalConfig = {
9+
WIDTH: 0,
10+
HEIGHT: 0, /* 世界的宽高度,为0默认屏幕大小*/
11+
MODE: 'CANVAS', /* 渲染模式,默认CANVAS,*/
12+
ScaleMode: "SHOW_ALL", /* 画面拉伸模式,此为默认*/
13+
FullScreen: false, /* 初始全屏, 可以使用函数修改*/
14+
DeveloperModel: 'YourGame', /* 游戏脚本的对象名*/
15+
BagSystem: true, /* 开启背包系统, 可以使用函数修改 */
16+
Keys:[...], /* 游戏中需要用到的按键 */
17+
BagBar: {...}. /* 背包系统的侧边栏*/
18+
MapArea: {...}. /* 地图区域*/
19+
Assets: {...}, /* 游戏资源*/
20+
README: {...}, /* 游戏开始前言*/};
21+
```
22+
## config.js
23+
624
+ WIDTH
725
> 游戏窗口宽度,值为像素. 默认值为0, 宽度为显示器宽度
826
+ HEIGHT

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
name: 'APG',
2828
repo: 'SuCicada/Algorithm-PlayGround',
2929
// el: '#wait',
30-
// auto2top: true,
30+
auto2top: true,
3131
search: {
3232
placeholder: {
3333
'/zh-cn/': '搜索',

src/APG/APG-core.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,12 @@ var preload = {
243243
}
244244
}
245245
APG.Assets.spritesheets = this.spritesheets;
246+
console.log(APG.Assets.spritesheets)
247+
246248
},
247249
create: function () {
250+
console.log(APG.Assets.spritesheets)
251+
248252
game.state.add("startGame",startGame);
249253
game.state.start("startGame");
250254
},
@@ -280,6 +284,7 @@ var startGame = {
280284
preload: function(){
281285
/* 这里就放一些补充的材料, 还有你的 */
282286
/* 重新载入帧动画贴图 */
287+
283288
let spritesheets = APG.Assets.spritesheets;
284289
for(i=0;i<spritesheets.length;i++) {
285290
var ss = spritesheets[i];

src/APG/Assets.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,19 @@ console.log("Assets.js has been loaded successfully.")
22

33
/* ========== Assets ==================== */
44
/* music */
5-
APG.Assets.playMusic = function(keyName){
6-
APG.Assets.music[keyName].play('',0,1,true);
7-
console.log("Play music: "+keyName);
5+
6+
/**
7+
* @class APG.Assets
8+
*/
9+
APG.Assets;
10+
/**
11+
* 播放音乐
12+
* @method APG.Assets#playMusic
13+
* @param {string} keyName - 音乐名
14+
*/
15+
APG.Assets.playMusic = function (keyName) {
16+
APG.Assets.music[keyName].play('', 0, 1, true);
17+
console.log("Play music: " + keyName);
818
};
919

1020
APG.Assets.stopMusic = function(keyName){

src/APG/config.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"tags": {
3+
"allowUnknownTags": true
4+
},
5+
"source": {
6+
"include": ["Assets.js"],
7+
"includePattern": ".+\\.js(doc|x)?$",
8+
"excludePattern": "(^|\\/|\\\\)_"
9+
},
10+
"plugins": ["plugins/markdown"],
11+
12+
"opts": {
13+
"debug" : false,
14+
"template" : "template",
15+
"destination": "./api/",
16+
"readme": ""
17+
},
18+
"templates": {
19+
"logoFile": "",
20+
"cleverLinks": true,
21+
"monospaceLinks": false,
22+
"dateFormat": "YYYY-MM-dd",
23+
"outputSourceFiles": true,
24+
"outputSourcePath": true,
25+
"systemName": "Algorithm PlayGround",
26+
"footer": "啊啊啊啊啊 ",
27+
"copyright": "APG Copyright © ....",
28+
"navType": "vertical",
29+
"linenums": true,
30+
"collapseSymbols": true,
31+
"inverseNav": true,
32+
"protocol": "html://",
33+
"methodHeadingReturns": true,
34+
"default": {
35+
"outputSourceFiles": true
36+
},
37+
"analytics" : {
38+
"ua" : "",
39+
"domain" : ""
40+
},
41+
"includeDate" : true,
42+
"search" : false,
43+
"sort" : null,
44+
"theme" : "phaser",
45+
"constructor" : "w"
46+
},
47+
"markdown": {
48+
"parser": "gfm",
49+
"hardwrap": true
50+
}
51+
}

0 commit comments

Comments
 (0)