Browse Source

重新生成游戏

master
song 4 years ago
parent
commit
4732591d08
  1. 5
      .gitignore
  2. 5
      .svrxrc.js
  3. 169
      README.md
  4. 34
      gulpfile.js
  5. BIN
      images/tomato_right_atlas_1.png
  6. BIN
      images/tomato_right_atlas_12.png
  7. BIN
      images/tomato_right_atlas_2.png
  8. BIN
      images/番茄炒蛋_右手)_1_atlas_1.png
  9. BIN
      images/番茄炒蛋_右手)_1_atlas_10.png
  10. BIN
      images/番茄炒蛋_右手)_1_atlas_11.png
  11. BIN
      images/番茄炒蛋_右手)_1_atlas_12.png
  12. BIN
      images/番茄炒蛋_右手)_1_atlas_2.png
  13. BIN
      images/番茄炒蛋_右手)_1_atlas_3.png
  14. BIN
      images/番茄炒蛋_右手)_1_atlas_4.png
  15. BIN
      images/番茄炒蛋_右手)_1_atlas_5.png
  16. BIN
      images/番茄炒蛋_右手)_1_atlas_6.png
  17. BIN
      images/番茄炒蛋_右手)_1_atlas_7.png
  18. BIN
      images/番茄炒蛋_右手)_1_atlas_8.png
  19. BIN
      images/番茄炒蛋_右手)_1_atlas_9.png
  20. BIN
      images/番茄炒蛋_右手)_HTML5 Canvas_atlas_1.png
  21. BIN
      images/番茄炒蛋_右手)_HTML5 Canvas_atlas_10.png
  22. BIN
      images/番茄炒蛋_右手)_HTML5 Canvas_atlas_11.png
  23. BIN
      images/番茄炒蛋_右手)_HTML5 Canvas_atlas_12.png
  24. BIN
      images/番茄炒蛋_右手)_HTML5 Canvas_atlas_2.png
  25. BIN
      images/番茄炒蛋_右手)_HTML5 Canvas_atlas_3.png
  26. BIN
      images/番茄炒蛋_右手)_HTML5 Canvas_atlas_4.png
  27. BIN
      images/番茄炒蛋_右手)_HTML5 Canvas_atlas_5.png
  28. BIN
      images/番茄炒蛋_右手)_HTML5 Canvas_atlas_6.png
  29. BIN
      images/番茄炒蛋_右手)_HTML5 Canvas_atlas_7.png
  30. BIN
      images/番茄炒蛋_右手)_HTML5 Canvas_atlas_8.png
  31. BIN
      images/番茄炒蛋_右手)_HTML5 Canvas_atlas_9.png
  32. 47
      index.html
  33. 31
      js/classes/sound.js
  34. 28
      js/custom.js
  35. 7
      js/test.js
  36. 4891
      package-lock.json
  37. 29
      package.json
  38. 0
      public/images/_preloader.gif
  39. BIN
      public/images/tomato_right_atlas_1.png
  40. 0
      public/images/tomato_right_atlas_10.png
  41. 0
      public/images/tomato_right_atlas_11.png
  42. BIN
      public/images/tomato_right_atlas_12.png
  43. BIN
      public/images/tomato_right_atlas_2.png
  44. 0
      public/images/tomato_right_atlas_3.png
  45. 0
      public/images/tomato_right_atlas_4.png
  46. 0
      public/images/tomato_right_atlas_5.png
  47. 0
      public/images/tomato_right_atlas_6.png
  48. 0
      public/images/tomato_right_atlas_7.png
  49. 0
      public/images/tomato_right_atlas_8.png
  50. 0
      public/images/tomato_right_atlas_9.png
  51. 0
      public/images/番茄炒鸡蛋1.jpg
  52. 37
      public/index.html
  53. 0
      public/libs/1.0.0/createjs.min.js
  54. BIN
      public/sounds/amazing.mp3
  55. BIN
      public/sounds/bgmMusic.mp3
  56. BIN
      public/sounds/excitationMusic.mp3
  57. BIN
      public/sounds/unbelievable.mp3
  58. BIN
      public/tomato-right.fla
  59. 0
      public/tomato-right.html
  60. 323
      public/tomato-right.js
  61. 47
      src/classes/again.js
  62. 9
      src/classes/back.js
  63. 22
      src/classes/count.js
  64. 47
      src/classes/demo.js
  65. 10
      src/classes/end.js
  66. 2
      src/classes/level.js
  67. 32
      src/classes/main.js
  68. 47
      src/classes/sound.js
  69. 55
      src/classes/suspend.js
  70. 42
      src/classes/time.js
  71. 57
      src/custom.js
  72. 3
      src/index.js
  73. 131
      src/message.js
  74. 57
      src/test.js

5
.gitignore

@ -106,3 +106,8 @@ dist
.vscode/ .vscode/
.idea/ .idea/
yarn.lock
dist
dist/*
.~README.md

5
.svrxrc.js

@ -1,5 +0,0 @@
module.exports = {
port: 3000,
https: false,
// registry: 'https://registry.npm.taobao.org',
}

169
README.md

@ -1,5 +1,13 @@
# 鸟妈妈回家 # 鸟妈妈回家
# 运行步骤
1. git clone https://dd.tall.wiki/gitea/ccsens_fe/bird-go-home.git
2. 全局安装gulp npm i gulp -g
3. npm i 或者 yarn
4. 运行gulp
5. 运行vscode的Go Live
6. 部署服务器 dist目录
## 游戏介绍 ## 游戏介绍
@ -26,46 +34,105 @@
## 目录结构说明 ## 目录结构说明
通过如下命令输出的目录结构:
```bash
tree -I "node_modules|package-lock.json|yarn.lock"
```
```bash ```bash
. │ .gitignore
├── README.md │ .prettierrc
├── bird.html │ .svrxrc.js
├── bird.js │ dist.zip
├── images │ gulpfile.js
│   ├── Bitmap1.png │ package-lock.json
│   ├── Bitmap2.png │ package.json
│   ├── Bitmap3.png │ README.md
│   ├── Bitmap4.png
│   ├── Bitmap5.png ├─dist
│   ├── _preloader.gif │ │ bird.js
│   ├── level.png │ │ index.html
│   ├── 任务完成_.png │ │ main.js
│   ├── 倒计时_.png │ │
│   ├── 树林前景_.png │ ├─images
│   ├── 计时_.png │ │ Bitmap1.png
│   └── 返回按钮_.png │ │ Bitmap2.png
├── index.html │ │ Bitmap3.png
├── js │ │ Bitmap4.png
│   ├── classes │ │ Bitmap5.png
│   │   ├── back.js │ │ level.png
│   │   ├── bird.js │ │ stopDemo.png
│   │   ├── count.js │ │ suspend.png
│   │   ├── end.js │ │ _preloader.gif
│   │   ├── level.js │ │ 任务完成_.png
│   │   ├── sound.js │ │ 倒计时_.png
│   │   └── time.js │ │ 再来一次_.png
│   ├── custom.js │ │ 树林前景_.png
│   ├── index.js │ │ 计时_.png
│   └── test.js │ │ 返回按钮_.png
├── libs │ │
│   └── 1.0.0 │ ├─libs
│   └── createjs.min.js │ │ └─1.0.0
├── sounds │ │ createjs.min.js
│   ├── amazing.mp3 │ │
│   ├── bgmMusic.mp3 │ └─sounds
│   ├── excitationMusic.mp3 │ amazing.mp3
│   └── unbelievable.mp3 │ bgmMusic.mp3
└── 鸟妈妈回家_HTML5 Canvas.fla │ excitationMusic.mp3
│ unbelievable.mp3
├─public
│ │ bird.html
│ │ bird.js
│ │ index.html
│ │ 鸟妈妈回家_HTML5 Canvas.fla
│ │
│ ├─images
│ │ Bitmap1.png
│ │ Bitmap2.png
│ │ Bitmap3.png
│ │ Bitmap4.png
│ │ Bitmap5.png
│ │ level.png
│ │ stopDemo.png
│ │ suspend.png
│ │ _preloader.gif
│ │ 任务完成_.png
│ │ 倒计时_.png
│ │ 再来一次_.png
│ │ 树林前景_.png
│ │ 计时_.png
│ │ 返回按钮_.png
│ │
│ ├─libs
│ │ └─1.0.0
│ │ createjs.min.js
│ │
│ └─sounds
│ amazing.mp3
│ bgmMusic.mp3
│ excitationMusic.mp3
│ unbelievable.mp3
└─src
│ custom.js
│ index.js
│ test.js
└─classes
again.js
back.js
count.js
demo.js
end.js
level.js
main.js
sound.js
suspend.js
time.js
``` ```
| 文件 | 说明 | 备注 | | 文件 | 说明 | 备注 |
@ -100,16 +167,7 @@
```js ```js
<script src="libs/1.0.0/createjs.min.js"></script> <script src="libs/1.0.0/createjs.min.js"></script>
<script src="bird.js"></script> <script src="bird.js"></script>
<script src="js/index.js"></script> <script src="main.js"></script>
<script src="js/custom.js"></script>
<script src="js/classes/bird.js"></script>
<script src="js/classes/count.js"></script>
<script src="js/classes/back.js"></script>
<script src="js/classes/time.js"></script>
<script src="js/classes/level.js"></script>
<script src="js/classes/sound.js"></script>
<script src="js/classes/end.js"></script>
<script src="js/test.js"></script>
<!-- write your code here --> <!-- write your code here -->
</head> </head>
<body onload="init();" style="margin: 0px;"> <body onload="init();" style="margin: 0px;">
@ -119,12 +177,6 @@
</div> </div>
</div> </div>
<div id='_preload_div_' style='position:absolute; top:0; left:0; display: inline-block; height:720px; width: 1280px; text-align: center;'> <span style='display: inline-block; height: 100%; vertical-align: middle;'></span> <img src=images/_preloader.gif style='vertical-align: middle; max-height: 100%'/></div> <div id='_preload_div_' style='position:absolute; top:0; left:0; display: inline-block; height:720px; width: 1280px; text-align: center;'> <span style='display: inline-block; height: 100%; vertical-align: middle;'></span> <img src=images/_preloader.gif style='vertical-align: middle; max-height: 100%'/></div>
<div style="position: fixed; top: 0; left: 0; z-index: 999;padding: 20px">
<h3>测试功能区</h3>
<button onclick="Count.of()">开始倒计时</button>
<button onclick="timeInstance.start()">开始游戏</button>
<button>结束游戏</button>
</div>
</body> </body>
``` ```
@ -139,6 +191,7 @@ function handleComplete(evt, comp) {
var ss = comp.getSpriteSheet(); var ss = comp.getSpriteSheet();
var queue = evt.target; var queue = evt.target;
var ssMetadata = lib.ssMetadata; var ssMetadata = lib.ssMetadata;
// for循环 i=0; 前面需要加 let, 否则编译会报错
for (i = 0; i < ssMetadata.length; i++) { for (i = 0; i < ssMetadata.length; i++) {
ss[ssMetadata[i].name] = new createjs.SpriteSheet({ images: [queue.getResult(ssMetadata[i].name)], frames: ssMetadata[i].frames }); ss[ssMetadata[i].name] = new createjs.SpriteSheet({ images: [queue.getResult(ssMetadata[i].name)], frames: ssMetadata[i].frames });
} }
@ -183,7 +236,7 @@ let state = 0; // 游戏状态 0->未开始 1->进行中 2->结束
function initStage(lib) { function initStage(lib) {
library = lib; library = lib;
window.bird = Bird.of(gameOver); // 初始化鸟等 window.main = Main.of(gameOver); // 初始化鸟等
window.timeInstance = Time.of(gameOver); // 初始化游戏时间 window.timeInstance = Time.of(gameOver); // 初始化游戏时间
// window.soundInstance = Sound.of(); // 初始化音频 // window.soundInstance = Sound.of(); // 初始化音频
Level.of(2); // 游戏难度级别 Level.of(2); // 游戏难度级别
@ -193,7 +246,7 @@ function initStage(lib) {
// 游戏结束 显示结束得分面板 // 游戏结束 显示结束得分面板
function gameOver() { function gameOver() {
state = 2; state = 2;
const times = bird.times; const times = main.times;
const score = parseInt((config.total / config.times) * times); const score = parseInt((config.total / config.times) * times);
End.of(score); End.of(score);
} }
@ -319,6 +372,4 @@ Time.prototype.update = function () {
``` ```
**特别说明:**时间关系,还有很多需要完善的,比如上文中的endCallback就没有做类型判断。后续除了程序的健壮性优化提升之外,还须添加webpack工程化打包构建等,避免源代码暴露,代码体积、模块导入引用等都能得到好的提升 **特别说明:**时间关系,还有很多需要完善的,比如上文中的endCallback就没有做类型判断。后续除了程序的健壮性优化提升之外,还须添加webpack工程化打包构建等,避免源代码暴露,代码体积、模块导入引用等都能得到好的提升

34
gulpfile.js

@ -0,0 +1,34 @@
const { task, series, parallel, src, dest, watch } = require('gulp');
const babel = require('gulp-babel');
const uglify = require('gulp-uglify');
const concat = require('gulp-concat');
const clean = require('gulp-clean');
const livereload = require('gulp-livereload');
const cleanTask = function () {
return src('dist/*', { read: false }).pipe(clean());
};
const script = function () {
return src('src/**/*.js')
.pipe(babel({ presets: ['@babel/env'] }))
.pipe(uglify())
.pipe(concat('main.js'))
.pipe(dest('dist/'))
.pipe(livereload({ start: true, port: 3001, reloadPage: 'dist/index.html' }));
};
const copy = function () {
src('./public/index.html').pipe(dest('dist/'));
src('./public/tomato-right.js').pipe(dest('dist/'));
src('./public/images/*').pipe(dest('dist/images'));
src('./public/libs/**/*').pipe(dest('dist/libs'));
src('./public/sounds/*').pipe(dest('dist/sounds'));
};
const watchTask = function () {
livereload.listen();
watch('src/*', script);
};
exports.default = parallel(copy, script, watchTask);

BIN
images/tomato_right_atlas_1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

BIN
images/tomato_right_atlas_12.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 437 KiB

BIN
images/tomato_right_atlas_2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

BIN
images/番茄炒蛋_右手)_1_atlas_1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

BIN
images/番茄炒蛋_右手)_1_atlas_10.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 KiB

BIN
images/番茄炒蛋_右手)_1_atlas_11.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

BIN
images/番茄炒蛋_右手)_1_atlas_12.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 324 KiB

BIN
images/番茄炒蛋_右手)_1_atlas_2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

BIN
images/番茄炒蛋_右手)_1_atlas_3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

BIN
images/番茄炒蛋_右手)_1_atlas_4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

BIN
images/番茄炒蛋_右手)_1_atlas_5.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

BIN
images/番茄炒蛋_右手)_1_atlas_6.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

BIN
images/番茄炒蛋_右手)_1_atlas_7.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

BIN
images/番茄炒蛋_右手)_1_atlas_8.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

BIN
images/番茄炒蛋_右手)_1_atlas_9.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

BIN
images/番茄炒蛋_右手)_HTML5 Canvas_atlas_1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

BIN
images/番茄炒蛋_右手)_HTML5 Canvas_atlas_10.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 KiB

BIN
images/番茄炒蛋_右手)_HTML5 Canvas_atlas_11.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

BIN
images/番茄炒蛋_右手)_HTML5 Canvas_atlas_12.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 346 KiB

BIN
images/番茄炒蛋_右手)_HTML5 Canvas_atlas_2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

BIN
images/番茄炒蛋_右手)_HTML5 Canvas_atlas_3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

BIN
images/番茄炒蛋_右手)_HTML5 Canvas_atlas_4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

BIN
images/番茄炒蛋_右手)_HTML5 Canvas_atlas_5.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

BIN
images/番茄炒蛋_右手)_HTML5 Canvas_atlas_6.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

BIN
images/番茄炒蛋_右手)_HTML5 Canvas_atlas_7.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

BIN
images/番茄炒蛋_右手)_HTML5 Canvas_atlas_8.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

BIN
images/番茄炒蛋_右手)_HTML5 Canvas_atlas_9.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

47
index.html

@ -1,47 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="authoring-tool" content="Adobe_Animate_CC">
<title>tomato-right</title>
<style>
html {background-color: #000}
#animation_container, #_preload_div_ {
position:absolute;
margin:auto;
left:0;right:0;
top:0;bottom:0;
}
</style>
<script src="libs/1.0.0/createjs.min.js"></script>
<script src="tomato-right.js"></script>
<script src="js/index.js"></script>
<script src="js/custom.js"></script>
<script src="js/classes/main.js"></script>
<script src="js/classes/count.js"></script>
<script src="js/classes/back.js"></script>
<script src="js/classes/time.js"></script>
<script src="js/classes/level.js"></script>
<script src="js/classes/sound.js"></script>
<script src="js/classes/end.js"></script>
<script src="js/test.js"></script>
<!-- write your code here -->
</head>
<body onload="init();" style="margin:0px;">
<div id="animation_container" style="background-color:rgba(255, 255, 255, 1.00); width:1280px; height:720px">
<canvas id="canvas" width="1280" height="720" style="position: absolute; display: none; background-color:rgba(255, 255, 255, 1.00);"></canvas>
<div id="dom_overlay_container" style="pointer-events:none; overflow:hidden; width:1280px; height:720px; position: absolute; left: 0px; top: 0px; display: none;">
</div>
</div>
<div id='_preload_div_' style='position:absolute; top:0; left:0; display: inline-block; height:720px; width: 1280px; text-align: center;'> <span style='display: inline-block; height: 100%; vertical-align: middle;'></span> <img src=images/_preloader.gif style='vertical-align: middle; max-height: 100%'/></div>
<div style="position: fixed; top: 0; left: 0; z-index: 999;padding: 20px">
<h3>测试功能区</h3>
<button onclick="Count.of()">开始倒计时</button>
<button onclick="timeInstance.start()">开始游戏</button>
<button>结束游戏</button>
</div>
</body>
</html>

31
js/classes/sound.js

@ -1,31 +0,0 @@
// 音频处理类
function Sound() {
this.lib = library;
this.music = {};
}
Sound.of = function () {
const instance = new Sound();
instance.init();
return instance;
};
Sound.prototype.init = function () {
createjs.Sound.alternateExtensions = ['mp3'];
const sounds = [
{ src: 'sounds/bgmMusic.mp3', id: 'bgm' },
{ src: 'sounds/excitationMusic.mp3', id: 'excitation' },
{ src: 'sounds/amazing.mp3', id: 'amazing' },
{ src: 'sounds/unbelievable.mp3', id: 'unbelievable' },
];
createjs.Sound.addEventListener('fileload', function (event) {
console.log('event: ', event);
this.music[event.id] = createjs.Sound.createInstance(event.id);
});
createjs.Sound.registerSounds(sounds, '../../');
};
Sound.prototype.playBgm = function () {
this.music.bgm && this.music.bgm.play({ loop: -1, volume: 0.3 }); // 播放背景音乐
};

28
js/custom.js

@ -1,28 +0,0 @@
const config = {
count: 5, // 默认倒计时时长
duration: 60, // 总时长 s
level: 1, // 游戏难度级别
total: 100, // 总分
times: 20, // 动作次数
};
let library = null;
let state = 0; // 游戏状态 0->未开始 1->进行中 2->结束
function initStage(lib) {
library = lib;
window.main = Main.of(gameOver); // 初始化鸟等
window.timeInstance = Time.of(gameOver); // 初始化游戏时间
// window.soundInstance = Sound.of(); // 初始化音频
Level.of(2); // 游戏难度级别
Back.of(); // 返回按钮
}
// 游戏结束 显示结束得分面板
function gameOver() {
state = 2;
const times = main.times;
const score = parseInt((config.total / config.times) * times);
End.of(score);
}

7
js/test.js

@ -1,7 +0,0 @@
function test() {
document.addEventListener('click', () => {
main.play();
});
}
test();

4891
package-lock.json

File diff suppressed because it is too large

29
package.json

@ -0,0 +1,29 @@
{
"name": "bird-go-home",
"version": "1.0.0",
"description": "",
"main": ".svrxrc.js",
"scripts": {
"dev": "gulp"
},
"repository": {
"type": "git",
"url": "gitea@dd.tall.wiki:ccsens_fe/bird-go-home.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/core": "^7.15.5",
"@babel/preset-env": "^7.15.6",
"gulp": "^4.0.2",
"gulp-babel": "^8.0.0",
"gulp-clean": "^0.4.0",
"gulp-concat": "^2.6.1",
"gulp-livereload": "^4.0.2",
"gulp-uglify": "^3.0.2"
},
"dependencies": {
"vinyl-paths": "^4.0.0"
}
}

0
images/_preloader.gif → public/images/_preloader.gif

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
public/images/tomato_right_atlas_1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

0
images/tomato_right_atlas_10.png → public/images/tomato_right_atlas_10.png

Before

Width:  |  Height:  |  Size: 214 KiB

After

Width:  |  Height:  |  Size: 214 KiB

0
images/tomato_right_atlas_11.png → public/images/tomato_right_atlas_11.png

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 128 KiB

BIN
public/images/tomato_right_atlas_12.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 KiB

BIN
public/images/tomato_right_atlas_2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

0
images/tomato_right_atlas_3.png → public/images/tomato_right_atlas_3.png

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

0
images/tomato_right_atlas_4.png → public/images/tomato_right_atlas_4.png

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

0
images/tomato_right_atlas_5.png → public/images/tomato_right_atlas_5.png

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 109 KiB

0
images/tomato_right_atlas_6.png → public/images/tomato_right_atlas_6.png

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 112 KiB

0
images/tomato_right_atlas_7.png → public/images/tomato_right_atlas_7.png

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 116 KiB

0
images/tomato_right_atlas_8.png → public/images/tomato_right_atlas_8.png

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 114 KiB

0
images/tomato_right_atlas_9.png → public/images/tomato_right_atlas_9.png

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 98 KiB

0
images/番茄炒鸡蛋1.jpg → public/images/番茄炒鸡蛋1.jpg

Before

Width:  |  Height:  |  Size: 612 KiB

After

Width:  |  Height:  |  Size: 612 KiB

37
public/index.html

@ -0,0 +1,37 @@
<!DOCTYPE html>
<!--
NOTES:
1. All tokens are represented by '$' sign in the template.
2. You can write your code only wherever mentioned.
3. All occurrences of existing tokens will be replaced by their appropriate values.
4. Blank lines will be removed automatically.
5. Remove unnecessary comments before creating your template.
-->
<html>
<head>
<meta charset="UTF-8">
<meta name="authoring-tool" content="Adobe_Animate_CC">
<title>tomato-right</title>
<!-- write your code here -->
<style>
#animation_container, #_preload_div_ {
position:absolute;
margin:auto;
left:0;right:0;
top:0;bottom:0;
}
</style>
<script src="libs/1.0.0/createjs.min.js"></script>
<script src="tomato-right.js"></script>
<script src="main.js"></script>
<!-- write your code here -->
</head>
<body onload="init();" style="margin:0px;">
<div id="animation_container" style="background-color:rgba(255, 255, 255, 1.00); width:1280px; height:720px">
<canvas id="canvas" width="1280" height="720" style="position: absolute; display: none; background-color:rgba(255, 255, 255, 1.00);"></canvas>
<div id="dom_overlay_container" style="pointer-events:none; overflow:hidden; width:1280px; height:720px; position: absolute; left: 0px; top: 0px; display: none;">
</div>
</div>
<div id='_preload_div_' style='position:absolute; top:0; left:0; display: inline-block; height:720px; width: 1280px; text-align: center;'> <span style='display: inline-block; height: 100%; vertical-align: middle;'></span> <img src=images/_preloader.gif style='vertical-align: middle; max-height: 100%'/></div>
</body>
</html>

0
libs/1.0.0/createjs.min.js → public/libs/1.0.0/createjs.min.js

BIN
public/sounds/amazing.mp3

Binary file not shown.

BIN
public/sounds/bgmMusic.mp3

Binary file not shown.

BIN
public/sounds/excitationMusic.mp3

Binary file not shown.

BIN
public/sounds/unbelievable.mp3

Binary file not shown.

BIN
tomato-right.fla → public/tomato-right.fla

Binary file not shown.

0
tomato-right.html → public/tomato-right.html

323
tomato-right.js → public/tomato-right.js

@ -14,7 +14,7 @@ lib.ssMetadata = [
{name:"tomato_right_atlas_9", frames: [[0,0,1221,1198]]}, {name:"tomato_right_atlas_9", frames: [[0,0,1221,1198]]},
{name:"tomato_right_atlas_10", frames: [[0,0,1236,1183],[1238,0,630,1879]]}, {name:"tomato_right_atlas_10", frames: [[0,0,1236,1183],[1238,0,630,1879]]},
{name:"tomato_right_atlas_11", frames: [[1180,0,437,1264],[0,0,590,1879],[592,0,586,1872]]}, {name:"tomato_right_atlas_11", frames: [[1180,0,437,1264],[0,0,590,1879],[592,0,586,1872]]},
{name:"tomato_right_atlas_12", frames: [[1372,950,482,251],[0,1502,734,1],[946,0,932,330],[602,332,440,329],[0,0,944,330],[284,784,169,180],[1856,950,169,180],[1856,1132,169,180],[1353,1203,169,180],[1524,1203,169,180],[1695,1314,169,180],[1866,1314,169,180],[0,1320,169,180],[171,1320,169,180],[342,1320,169,180],[513,1320,169,180],[684,1320,169,180],[855,1320,169,180],[1026,1320,169,180],[1197,1385,169,180],[1368,1385,169,180],[1044,332,440,329],[602,663,397,329],[1001,663,369,329],[0,784,282,295],[1486,332,435,307],[1197,1320,116,47],[284,994,449,161],[735,994,449,161],[0,1157,449,161],[451,1157,449,161],[902,1157,449,161],[0,332,600,450],[1486,641,435,307],[1695,1203,85,70],[1186,994,75,75]]} {name:"tomato_right_atlas_12", frames: [[0,784,482,251],[342,1502,734,1],[946,0,932,330],[602,332,440,329],[0,0,944,330],[1656,950,169,180],[1827,950,169,180],[1656,1132,169,180],[1827,1132,169,180],[1353,1247,169,180],[1524,1314,169,180],[1695,1314,169,180],[1866,1314,169,180],[451,1320,169,180],[622,1320,169,180],[793,1320,169,180],[964,1320,169,180],[1135,1320,169,180],[0,1363,169,180],[171,1363,169,180],[1306,1429,169,180],[1044,332,440,329],[602,663,397,329],[1001,663,369,329],[1372,950,282,295],[1486,332,435,307],[1880,77,116,47],[484,994,449,161],[0,1037,449,161],[451,1157,449,161],[902,1157,449,161],[0,1200,449,161],[0,332,600,450],[1880,171,107,42],[1880,126,107,43],[1486,641,435,307],[935,994,400,99],[1880,0,85,70],[1967,0,75,75]]}
]; ];
@ -38,273 +38,273 @@ lib.ssMetadata = [
(lib.CachedBmp_81 = function() { (lib.CachedBmp_39 = function() {
this.initialize(ss["tomato_right_atlas_11"]); this.initialize(ss["tomato_right_atlas_11"]);
this.gotoAndStop(0); this.gotoAndStop(0);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_80 = function() { (lib.CachedBmp_38 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(0); this.gotoAndStop(0);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_79 = function() { (lib.CachedBmp_37 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(1); this.gotoAndStop(1);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_78 = function() { (lib.CachedBmp_36 = function() {
this.initialize(ss["tomato_right_atlas_9"]); this.initialize(ss["tomato_right_atlas_9"]);
this.gotoAndStop(0); this.gotoAndStop(0);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_77 = function() { (lib.CachedBmp_35 = function() {
this.initialize(ss["tomato_right_atlas_5"]); this.initialize(ss["tomato_right_atlas_5"]);
this.gotoAndStop(0); this.gotoAndStop(0);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_76 = function() { (lib.CachedBmp_34 = function() {
this.initialize(ss["tomato_right_atlas_6"]); this.initialize(ss["tomato_right_atlas_6"]);
this.gotoAndStop(0); this.gotoAndStop(0);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_75 = function() { (lib.CachedBmp_33 = function() {
this.initialize(ss["tomato_right_atlas_10"]); this.initialize(ss["tomato_right_atlas_10"]);
this.gotoAndStop(0); this.gotoAndStop(0);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_74 = function() { (lib.CachedBmp_32 = function() {
this.initialize(ss["tomato_right_atlas_7"]); this.initialize(ss["tomato_right_atlas_7"]);
this.gotoAndStop(0); this.gotoAndStop(0);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_73 = function() { (lib.CachedBmp_31 = function() {
this.initialize(ss["tomato_right_atlas_8"]); this.initialize(ss["tomato_right_atlas_8"]);
this.gotoAndStop(0); this.gotoAndStop(0);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_72 = function() { (lib.CachedBmp_30 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(2); this.gotoAndStop(2);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_71 = function() { (lib.CachedBmp_29 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(3); this.gotoAndStop(3);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_70 = function() { (lib.CachedBmp_28 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(4); this.gotoAndStop(4);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_69 = function() { (lib.CachedBmp_27 = function() {
this.initialize(ss["tomato_right_atlas_1"]); this.initialize(ss["tomato_right_atlas_1"]);
this.gotoAndStop(0); this.gotoAndStop(0);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_68 = function() { (lib.CachedBmp_26 = function() {
this.initialize(ss["tomato_right_atlas_11"]); this.initialize(ss["tomato_right_atlas_11"]);
this.gotoAndStop(1); this.gotoAndStop(1);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_67 = function() { (lib.CachedBmp_25 = function() {
this.initialize(ss["tomato_right_atlas_11"]); this.initialize(ss["tomato_right_atlas_11"]);
this.gotoAndStop(2); this.gotoAndStop(2);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_66 = function() { (lib.CachedBmp_24 = function() {
this.initialize(ss["tomato_right_atlas_10"]); this.initialize(ss["tomato_right_atlas_10"]);
this.gotoAndStop(1); this.gotoAndStop(1);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_65 = function() { (lib.CachedBmp_23 = function() {
this.initialize(ss["tomato_right_atlas_2"]); this.initialize(ss["tomato_right_atlas_2"]);
this.gotoAndStop(0); this.gotoAndStop(0);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_64 = function() { (lib.CachedBmp_22 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(5); this.gotoAndStop(5);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_63 = function() { (lib.CachedBmp_21 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(6); this.gotoAndStop(6);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_62 = function() { (lib.CachedBmp_20 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(7); this.gotoAndStop(7);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_61 = function() { (lib.CachedBmp_19 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(8); this.gotoAndStop(8);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_60 = function() { (lib.CachedBmp_18 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(9); this.gotoAndStop(9);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_59 = function() { (lib.CachedBmp_17 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(10); this.gotoAndStop(10);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_58 = function() { (lib.CachedBmp_16 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(11); this.gotoAndStop(11);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_57 = function() { (lib.CachedBmp_15 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(12); this.gotoAndStop(12);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_56 = function() { (lib.CachedBmp_14 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(13); this.gotoAndStop(13);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_55 = function() { (lib.CachedBmp_13 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(14); this.gotoAndStop(14);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_54 = function() { (lib.CachedBmp_12 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(15); this.gotoAndStop(15);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_53 = function() { (lib.CachedBmp_11 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(16); this.gotoAndStop(16);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_52 = function() { (lib.CachedBmp_10 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(17); this.gotoAndStop(17);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_51 = function() { (lib.CachedBmp_9 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(18); this.gotoAndStop(18);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_50 = function() { (lib.CachedBmp_8 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(19); this.gotoAndStop(19);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_49 = function() { (lib.CachedBmp_7 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(20); this.gotoAndStop(20);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_48 = function() { (lib.CachedBmp_6 = function() {
this.initialize(ss["tomato_right_atlas_4"]); this.initialize(ss["tomato_right_atlas_4"]);
this.gotoAndStop(0); this.gotoAndStop(0);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_47 = function() { (lib.CachedBmp_5 = function() {
this.initialize(ss["tomato_right_atlas_3"]); this.initialize(ss["tomato_right_atlas_3"]);
this.gotoAndStop(0); this.gotoAndStop(0);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_46 = function() { (lib.CachedBmp_4 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(21); this.gotoAndStop(21);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_45 = function() { (lib.CachedBmp_3 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(22); this.gotoAndStop(22);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_44 = function() { (lib.CachedBmp_2 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(23); this.gotoAndStop(23);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.CachedBmp_43 = function() { (lib.CachedBmp_1 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(24); this.gotoAndStop(24);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
@ -373,24 +373,45 @@ p.nominalBounds = new cjs.Rectangle(0,0,3766,720);
(lib.任务完成 = function() { (lib.stopDemo = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(33); this.gotoAndStop(33);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.计时 = function() { (lib.suspend = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(34); this.gotoAndStop(34);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.返回按钮 = function() { (lib.任务完成 = function() {
this.initialize(ss["tomato_right_atlas_12"]); this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(35); this.gotoAndStop(35);
}).prototype = p = new cjs.Sprite(); }).prototype = p = new cjs.Sprite();
(lib.再来一次_ = function() {
this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(36);
}).prototype = p = new cjs.Sprite();
(lib.计时 = function() {
this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(37);
}).prototype = p = new cjs.Sprite();
(lib.返回按钮 = function() {
this.initialize(ss["tomato_right_atlas_12"]);
this.gotoAndStop(38);
}).prototype = p = new cjs.Sprite();
// helper functions: // helper functions:
function mc_symbol_clone() { function mc_symbol_clone() {
@ -447,6 +468,50 @@ if (reversed == null) { reversed = false; }
}).prototype = getMCSymbolPrototype(lib.timeBg, new cjs.Rectangle(-60,-49,120,98.9), null); }).prototype = getMCSymbolPrototype(lib.timeBg, new cjs.Rectangle(-60,-49,120,98.9), null);
(lib.Suspend = function(mode,startPosition,loop,reversed) {
if (loop == null) { loop = true; }
if (reversed == null) { reversed = false; }
var props = new Object();
props.mode = mode;
props.startPosition = startPosition;
props.labels = {};
props.loop = loop;
props.reversed = reversed;
cjs.MovieClip.apply(this,[props]);
// 图层_1
this.instance = new lib.suspend();
this.instance.setTransform(-53,-21);
this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));
this._renderFirstFrame();
}).prototype = getMCSymbolPrototype(lib.Suspend, new cjs.Rectangle(-53,-21,107,43), null);
(lib.stopDemo_1 = function(mode,startPosition,loop,reversed) {
if (loop == null) { loop = true; }
if (reversed == null) { reversed = false; }
var props = new Object();
props.mode = mode;
props.startPosition = startPosition;
props.labels = {};
props.loop = loop;
props.reversed = reversed;
cjs.MovieClip.apply(this,[props]);
// 图层_1
this.instance = new lib.stopDemo();
this.instance.setTransform(-53,-21);
this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));
this._renderFirstFrame();
}).prototype = getMCSymbolPrototype(lib.stopDemo_1, new cjs.Rectangle(-53,-21,107,42), null);
(lib.shasdksf = function(mode,startPosition,loop,reversed) { (lib.shasdksf = function(mode,startPosition,loop,reversed) {
if (loop == null) { loop = true; } if (loop == null) { loop = true; }
if (reversed == null) { reversed = false; } if (reversed == null) { reversed = false; }
@ -459,7 +524,7 @@ if (reversed == null) { reversed = false; }
cjs.MovieClip.apply(this,[props]); cjs.MovieClip.apply(this,[props]);
// 图层_1 // 图层_1
this.instance = new lib.CachedBmp_81(); this.instance = new lib.CachedBmp_39();
this.instance.setTransform(0,0,0.436,0.436); this.instance.setTransform(0,0,0.436,0.436);
this.timeline.addTween(cjs.Tween.get(this.instance).wait(1)); this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));
@ -500,7 +565,7 @@ if (reversed == null) { reversed = false; }
// level-layer // level-layer
this.instance = new lib.Bitmap2(); this.instance = new lib.Bitmap2();
this.instance.setTransform(-104.45,-37.35,0.4658,0.4658); this.instance.setTransform(-104.4,-37.3,0.4657,0.4657);
this.instance_1 = new lib.Bitmap3(); this.instance_1 = new lib.Bitmap3();
this.instance_1.setTransform(-105,-38,0.4658,0.4658); this.instance_1.setTransform(-105,-38,0.4658,0.4658);
@ -517,9 +582,9 @@ if (reversed == null) { reversed = false; }
this.instance_5 = new lib.Bitmap1(); this.instance_5 = new lib.Bitmap1();
this.instance_5.setTransform(-58,-24); this.instance_5.setTransform(-58,-24);
this.text = new cjs.Text("困难", "bold 87px 'Source Han Sans HW SC'", "#FFFFFF"); this.text = new cjs.Text("困难", "87px 'Arial'", "#FFFFFF");
this.text.textAlign = "center"; this.text.textAlign = "center";
this.text.lineHeight = 128; this.text.lineHeight = 89;
this.text.lineWidth = 188; this.text.lineWidth = 188;
this.text.parent = this; this.text.parent = this;
this.text.setTransform(58,-71.5); this.text.setTransform(58,-71.5);
@ -544,22 +609,22 @@ if (reversed == null) { reversed = false; }
cjs.MovieClip.apply(this,[props]); cjs.MovieClip.apply(this,[props]);
// 图层_1 // 图层_1
this.instance = new lib.CachedBmp_73(); this.instance = new lib.CachedBmp_31();
this.instance.setTransform(0,0,0.3226,0.3226); this.instance.setTransform(0,0,0.3226,0.3226);
this.instance_1 = new lib.CachedBmp_74(); this.instance_1 = new lib.CachedBmp_32();
this.instance_1.setTransform(0,0,0.3226,0.3226); this.instance_1.setTransform(0,0,0.3226,0.3226);
this.instance_2 = new lib.CachedBmp_75(); this.instance_2 = new lib.CachedBmp_33();
this.instance_2.setTransform(12,10.8,0.3226,0.3226); this.instance_2.setTransform(12,10.8,0.3226,0.3226);
this.instance_3 = new lib.CachedBmp_76(); this.instance_3 = new lib.CachedBmp_34();
this.instance_3.setTransform(-2.35,3.25,0.3226,0.3226); this.instance_3.setTransform(-2.35,3.25,0.3226,0.3226);
this.instance_4 = new lib.CachedBmp_77(); this.instance_4 = new lib.CachedBmp_35();
this.instance_4.setTransform(-2.35,3.25,0.3226,0.3226); this.instance_4.setTransform(-2.35,3.25,0.3226,0.3226);
this.instance_5 = new lib.CachedBmp_78(); this.instance_5 = new lib.CachedBmp_36();
this.instance_5.setTransform(11.15,8.8,0.3226,0.3226); this.instance_5.setTransform(11.15,8.8,0.3226,0.3226);
this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance}]}).to({state:[]},1).to({state:[{t:this.instance_1}]},1).to({state:[]},1).to({state:[{t:this.instance_2}]},1).to({state:[]},1).to({state:[{t:this.instance_3}]},1).to({state:[]},1).to({state:[{t:this.instance_4}]},1).to({state:[]},1).to({state:[{t:this.instance_5}]},1).wait(1)); this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance}]}).to({state:[]},1).to({state:[{t:this.instance_1}]},1).to({state:[]},1).to({state:[{t:this.instance_2}]},1).to({state:[]},1).to({state:[{t:this.instance_3}]},1).to({state:[]},1).to({state:[{t:this.instance_4}]},1).to({state:[]},1).to({state:[{t:this.instance_5}]},1).wait(1));
@ -653,6 +718,28 @@ if (reversed == null) { reversed = false; }
}).prototype = getMCSymbolPrototype(lib.bgModalBegin, new cjs.Rectangle(-218,-154,435,307), null); }).prototype = getMCSymbolPrototype(lib.bgModalBegin, new cjs.Rectangle(-218,-154,435,307), null);
(lib.btnAgain = function(mode,startPosition,loop,reversed) {
if (loop == null) { loop = true; }
if (reversed == null) { reversed = false; }
var props = new Object();
props.mode = mode;
props.startPosition = startPosition;
props.labels = {};
props.loop = loop;
props.reversed = reversed;
cjs.MovieClip.apply(this,[props]);
// 图层_1
this.instance = new lib.再来一次_();
this.instance.setTransform(-200,-49);
this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));
this._renderFirstFrame();
}).prototype = getMCSymbolPrototype(lib.btnAgain, new cjs.Rectangle(-200,-49,400,99), null);
(lib._218787dkjkjf = function(mode,startPosition,loop,reversed) { (lib._218787dkjkjf = function(mode,startPosition,loop,reversed) {
if (loop == null) { loop = true; } if (loop == null) { loop = true; }
if (reversed == null) { reversed = false; } if (reversed == null) { reversed = false; }
@ -813,19 +900,19 @@ if (reversed == null) { reversed = false; }
cjs.MovieClip.apply(this,[props]); cjs.MovieClip.apply(this,[props]);
// 图层_1 // 图层_1
this.instance = new lib.CachedBmp_65(); this.instance = new lib.CachedBmp_23();
this.instance.setTransform(0,0,0.3802,0.3802); this.instance.setTransform(0,0,0.3802,0.3802);
this.instance_1 = new lib.CachedBmp_66(); this.instance_1 = new lib.CachedBmp_24();
this.instance_1.setTransform(118.7,-6,0.3802,0.3802); this.instance_1.setTransform(118.7,-6,0.3802,0.3802);
this.instance_2 = new lib.CachedBmp_67(); this.instance_2 = new lib.CachedBmp_25();
this.instance_2.setTransform(121.5,-25.3,0.3802,0.3802); this.instance_2.setTransform(121.5,-25.3,0.3802,0.3802);
this.instance_3 = new lib.CachedBmp_68(); this.instance_3 = new lib.CachedBmp_26();
this.instance_3.setTransform(118.7,-6,0.3802,0.3802); this.instance_3.setTransform(118.7,-6,0.3802,0.3802);
this.instance_4 = new lib.CachedBmp_69(); this.instance_4 = new lib.CachedBmp_27();
this.instance_4.setTransform(0,0,0.3802,0.3802); this.instance_4.setTransform(0,0,0.3802,0.3802);
this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance}]}).to({state:[{t:this.instance_1}]},2).to({state:[{t:this.instance_2}]},2).to({state:[{t:this.instance_3}]},8).to({state:[{t:this.instance_4}]},2).wait(1)); this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance}]}).to({state:[{t:this.instance_1}]},2).to({state:[{t:this.instance_2}]},2).to({state:[{t:this.instance_3}]},8).to({state:[{t:this.instance_4}]},2).wait(1));
@ -880,52 +967,52 @@ if (reversed == null) { reversed = false; }
cjs.MovieClip.apply(this,[props]); cjs.MovieClip.apply(this,[props]);
// 图层_1 // 图层_1
this.instance = new lib.CachedBmp_49(); this.instance = new lib.CachedBmp_7();
this.instance.setTransform(373.7,243.3,0.5,0.5); this.instance.setTransform(373.7,243.3,0.5,0.5);
this.instance_1 = new lib.CachedBmp_50(); this.instance_1 = new lib.CachedBmp_8();
this.instance_1.setTransform(373.7,243.3,0.5,0.5); this.instance_1.setTransform(373.7,243.3,0.5,0.5);
this.instance_2 = new lib.CachedBmp_51(); this.instance_2 = new lib.CachedBmp_9();
this.instance_2.setTransform(373.7,243.3,0.5,0.5); this.instance_2.setTransform(373.7,243.3,0.5,0.5);
this.instance_3 = new lib.CachedBmp_52(); this.instance_3 = new lib.CachedBmp_10();
this.instance_3.setTransform(373.7,243.3,0.5,0.5); this.instance_3.setTransform(373.7,243.3,0.5,0.5);
this.instance_4 = new lib.CachedBmp_53(); this.instance_4 = new lib.CachedBmp_11();
this.instance_4.setTransform(373.7,243.3,0.5,0.5); this.instance_4.setTransform(373.7,243.3,0.5,0.5);
this.instance_5 = new lib.CachedBmp_54(); this.instance_5 = new lib.CachedBmp_12();
this.instance_5.setTransform(373.7,243.3,0.5,0.5); this.instance_5.setTransform(373.7,243.3,0.5,0.5);
this.instance_6 = new lib.CachedBmp_55(); this.instance_6 = new lib.CachedBmp_13();
this.instance_6.setTransform(373.7,243.3,0.5,0.5); this.instance_6.setTransform(373.7,243.3,0.5,0.5);
this.instance_7 = new lib.CachedBmp_56(); this.instance_7 = new lib.CachedBmp_14();
this.instance_7.setTransform(373.7,243.3,0.5,0.5); this.instance_7.setTransform(373.7,243.3,0.5,0.5);
this.instance_8 = new lib.CachedBmp_57(); this.instance_8 = new lib.CachedBmp_15();
this.instance_8.setTransform(373.7,243.3,0.5,0.5); this.instance_8.setTransform(373.7,243.3,0.5,0.5);
this.instance_9 = new lib.CachedBmp_58(); this.instance_9 = new lib.CachedBmp_16();
this.instance_9.setTransform(373.7,243.3,0.5,0.5); this.instance_9.setTransform(373.7,243.3,0.5,0.5);
this.instance_10 = new lib.CachedBmp_59(); this.instance_10 = new lib.CachedBmp_17();
this.instance_10.setTransform(373.7,243.3,0.5,0.5); this.instance_10.setTransform(373.7,243.3,0.5,0.5);
this.instance_11 = new lib.CachedBmp_60(); this.instance_11 = new lib.CachedBmp_18();
this.instance_11.setTransform(373.7,243.3,0.5,0.5); this.instance_11.setTransform(373.7,243.3,0.5,0.5);
this.instance_12 = new lib.CachedBmp_61(); this.instance_12 = new lib.CachedBmp_19();
this.instance_12.setTransform(373.7,243.3,0.5,0.5); this.instance_12.setTransform(373.7,243.3,0.5,0.5);
this.instance_13 = new lib.CachedBmp_62(); this.instance_13 = new lib.CachedBmp_20();
this.instance_13.setTransform(373.7,243.3,0.5,0.5); this.instance_13.setTransform(373.7,243.3,0.5,0.5);
this.instance_14 = new lib.CachedBmp_63(); this.instance_14 = new lib.CachedBmp_21();
this.instance_14.setTransform(373.7,243.3,0.5,0.5); this.instance_14.setTransform(373.7,243.3,0.5,0.5);
this.instance_15 = new lib.CachedBmp_64(); this.instance_15 = new lib.CachedBmp_22();
this.instance_15.setTransform(373.7,243.3,0.5,0.5); this.instance_15.setTransform(373.7,243.3,0.5,0.5);
this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance}]}).to({state:[{t:this.instance_1}]},1).to({state:[{t:this.instance_2}]},1).to({state:[{t:this.instance_3}]},1).to({state:[{t:this.instance_4}]},1).to({state:[{t:this.instance_5}]},1).to({state:[{t:this.instance_6}]},1).to({state:[{t:this.instance_7}]},1).to({state:[{t:this.instance_8}]},1).to({state:[{t:this.instance_9}]},1).to({state:[{t:this.instance_10}]},1).to({state:[{t:this.instance_11}]},1).to({state:[{t:this.instance_12}]},1).to({state:[{t:this.instance_13}]},1).to({state:[{t:this.instance_14}]},1).to({state:[]},1).to({state:[{t:this.instance_15}]},5).wait(1)); this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance}]}).to({state:[{t:this.instance_1}]},1).to({state:[{t:this.instance_2}]},1).to({state:[{t:this.instance_3}]},1).to({state:[{t:this.instance_4}]},1).to({state:[{t:this.instance_5}]},1).to({state:[{t:this.instance_6}]},1).to({state:[{t:this.instance_7}]},1).to({state:[{t:this.instance_8}]},1).to({state:[{t:this.instance_9}]},1).to({state:[{t:this.instance_10}]},1).to({state:[{t:this.instance_11}]},1).to({state:[{t:this.instance_12}]},1).to({state:[{t:this.instance_13}]},1).to({state:[{t:this.instance_14}]},1).to({state:[]},1).to({state:[{t:this.instance_15}]},5).wait(1));
@ -1052,7 +1139,7 @@ if (reversed == null) { reversed = false; }
this.shape_4.graphics.f("#FF0000").s().p("AaAbqIAAgCIACgCIAFABIACACIAAABgEAmIAKtQgEgRABgMQABAQADAQIgBgDgEglpga+QAFABAFADIAKADIABAHIgVgOgEglbgbpIABAIIgaANIgUAJQAYgOAVgQg"); this.shape_4.graphics.f("#FF0000").s().p("AaAbqIAAgCIACgCIAFABIACACIAAABgEAmIAKtQgEgRABgMQABAQADAQIgBgDgEglpga+QAFABAFADIAKADIABAHIgVgOgEglbgbpIABAIIgaANIgUAJQAYgOAVgQg");
this.shape_4.setTransform(22.75,-12.0625); this.shape_4.setTransform(22.75,-12.0625);
this.instance = new lib.CachedBmp_47(); this.instance = new lib.CachedBmp_5();
this.instance.setTransform(-375.3,-344.3,0.5,0.5); this.instance.setTransform(-375.3,-344.3,0.5,0.5);
this.shape_5 = new cjs.Shape(); this.shape_5 = new cjs.Shape();
@ -1071,7 +1158,7 @@ if (reversed == null) { reversed = false; }
this.shape_8.graphics.f("#FF9900").s().p("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"); this.shape_8.graphics.f("#FF9900").s().p("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");
this.shape_8.setTransform(-14.9573,-7.1302); this.shape_8.setTransform(-14.9573,-7.1302);
this.instance_1 = new lib.CachedBmp_48(); this.instance_1 = new lib.CachedBmp_6();
this.instance_1.setTransform(-353.55,-283.5,0.5,0.5); this.instance_1.setTransform(-353.55,-283.5,0.5,0.5);
this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.shape_4},{t:this.shape_3},{t:this.shape_2},{t:this.shape_1},{t:this.shape}]}).to({state:[{t:this.instance}]},2).to({state:[{t:this.shape_8},{t:this.shape_7},{t:this.shape_6},{t:this.shape_5}]},2).to({state:[{t:this.instance_1}]},2).wait(2)); this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.shape_4},{t:this.shape_3},{t:this.shape_2},{t:this.shape_1},{t:this.shape}]}).to({state:[{t:this.instance}]},2).to({state:[{t:this.shape_8},{t:this.shape_7},{t:this.shape_6},{t:this.shape_5}]},2).to({state:[{t:this.instance_1}]},2).wait(2));
@ -1096,15 +1183,15 @@ if (reversed == null) { reversed = false; }
// 图层_1 // 图层_1
this.shape = new cjs.Shape(); this.shape = new cjs.Shape();
this.shape.graphics.f("#ECD5B0").s().p("AnvGlQgzhzAYicQAmjyDGjGQDGjGDygmQBjgPBSAPQGOEJmcIKQkPESjyAAQidAAiShyg"); this.shape.graphics.f("#ECD5B0").s().p("AnvGlQgzhzAYicQAmjyDGjGQDGjGDygmQBjgPBSAPQGOEJmcIKQkPESjyAAQidAAiShyg");
this.shape.setTransform(44.5159,66.7983,1,1,-29.9999); this.shape.setTransform(44.4726,66.8233,1,1,-29.9999);
this.shape_1 = new cjs.Shape(); this.shape_1 = new cjs.Shape();
this.shape_1.graphics.f("#DFBA7B").s().p("AnuHaQgygygcg/QF0EiG8nBQGcoKmOkKQB2AWBVBUQCOCPgmDwQglDyjGDGQjHDGjyAmQgyAIguAAQiuAAhxhxg"); this.shape_1.graphics.f("#DFBA7B").s().p("AnuHaQgygygcg/QF0EiG8nBQGcoKmOkKQB2AWBVBUQCOCPgmDwQglDyjGDGQjHDGjyAmQgyAIguAAQiuAAhxhxg");
this.shape_1.setTransform(54.1824,68.087,1,1,-29.9999); this.shape_1.setTransform(54.1391,68.112,1,1,-29.9999);
this.shape_2 = new cjs.Shape(); this.shape_2 = new cjs.Shape();
this.shape_2.graphics.f("#563318").s().p("AnrHsQiWiWAnj7QAnj4DLjLQDLjLD4gnQD7gnCWCWQCWCVgoD7QgmD4jLDLQjMDMj4AmQg0AJgwAAQi2AAh2h3gABepGQjyAmjGDGQjGDGgmDyQgYCcAzBzQAcA+AyAzQCPCODwgmQDyglDHjHQDGjGAljyQAmjwiOiPQhVhUh2gVQgogHgtAAQgtAAgzAHg"); this.shape_2.graphics.f("#563318").s().p("AnrHsQiWiWAnj7QAnj4DLjLQDLjLD4gnQD7gnCWCWQCWCVgoD7QgmD4jLDLQjMDMj4AmQg0AJgwAAQi2AAh2h3gABepGQjyAmjGDGQjGDGgmDyQgYCcAzBzQAcA+AyAzQCPCODwgmQDyglDHjHQDGjGAljyQAmjwiOiPQhVhUh2gVQgogHgtAAQgtAAgzAHg");
this.shape_2.setTransform(52.4922,68.6406,1,1,-29.9999); this.shape_2.setTransform(52.4489,68.6656,1,1,-29.9999);
this.shape_3 = new cjs.Shape(); this.shape_3 = new cjs.Shape();
this.shape_3.graphics.f("#ECD5B0").s().p("AjZJnQhmhKg4iTQhZjlBIkOQBIkPDAiaQBOg+BOgcQHdAfhfKSQg6DchiCEIiTgSICXhSIAEgEIABgFIgRhKQgDADAAAEIAAA9IirBdIAAAAQgEAAgDABIgBACIgDABIAAAAIilCUIAAgBIhcizIA+hxICEAAQADAAADgCIBvhkIADgEIA/iaIBXgPIgCgCQgDgDgEAAIhUAAQgEAAgDADIgDADIhBCeIhqBgIh1AAIAGgLIBIg8IACgEIABgEIgPiZIgCACQgDACAAAFIAACLIhFA7IgCADIhUCWIgBAEIABAFIBeC2IAABAIgHAAQgqAAgtgGgAhnI/QADAAACgCICriZIABAAICmATQiICsjPAKgAClgIIAAgEQAAAEADADIADACQgEgCgCgDg"); this.shape_3.graphics.f("#ECD5B0").s().p("AjZJnQhmhKg4iTQhZjlBIkOQBIkPDAiaQBOg+BOgcQHdAfhfKSQg6DchiCEIiTgSICXhSIAEgEIABgFIgRhKQgDADAAAEIAAA9IirBdIAAAAQgEAAgDABIgBACIgDABIAAAAIilCUIAAgBIhcizIA+hxICEAAQADAAADgCIBvhkIADgEIA/iaIBXgPIgCgCQgDgDgEAAIhUAAQgEAAgDADIgDADIhBCeIhqBgIh1AAIAGgLIBIg8IACgEIABgEIgPiZIgCACQgDACAAAFIAACLIhFA7IgCADIhUCWIgBAEIABAFIBeC2IAABAIgHAAQgqAAgtgGgAhnI/QADAAACgCICriZIABAAICmATQiICsjPAKgAClgIIAAgEQAAAEADADIADACQgEgCgCgDg");
@ -1208,7 +1295,7 @@ if (reversed == null) { reversed = false; }
this._renderFirstFrame(); this._renderFirstFrame();
}).prototype = p = new cjs.MovieClip(); }).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(92.3,-155.9,629.7,1497); p.nominalBounds = new cjs.Rectangle(92.3,-155.8,629.7,1496.8999999999999);
(lib._271878sd7cbvb5454 = function(mode,startPosition,loop,reversed) { (lib._271878sd7cbvb5454 = function(mode,startPosition,loop,reversed) {
@ -1299,7 +1386,7 @@ if (reversed == null) { reversed = false; }
// 图层_6 // 图层_6
this.shape = new cjs.Shape(); this.shape = new cjs.Shape();
this.shape.graphics.lf(["#EEEEEE","#E6DED8"],[0,1],308.8,-26.2,-75.9,72).s().p("AiIatQgugpgtgtQoToTgqrcQCbBQDSAmQCTEKFUB3QBODzD3B8QBVCxDGBdQALBTAOBTQlMAsmCAAIhngBgAGH41QDEhTDWglQhtB7g3CFg"); this.shape.graphics.lf(["#EEEEEE","#E6DED8"],[0,1],308.8,-26.2,-75.9,71.9).s().p("AiIatQgugpgtgtQoToTgqrcQCbBQDSAmQCTEKFUB3QBODzD3B8QBVCxDGBdQALBTAOBTQlMAsmCAAIhngBgAGH41QDEhTDWglQhtB7g3CFg");
this.shape.setTransform(793.8121,449.3311,1.1135,1.1135); this.shape.setTransform(793.8121,449.3311,1.1135,1.1135);
this.shape_1 = new cjs.Shape(); this.shape_1 = new cjs.Shape();
@ -1536,16 +1623,16 @@ if (reversed == null) { reversed = false; }
this.shape_39.graphics.f("#282724").s().p("AgzIaIAAAAQnxhSBFn7IAAgBQBqmzFag5IABAAQD1gQCBCFQCBCFALEYIAAABQgPE6iHCKQhpBsixAAQgzAAg4gJgAFEGpQCBiGAPkwIAAgBQgLkPh7iAQh8h/jrAQIABgBQlNA5hmGkQhCHnHdBPIAAAAQDzAnCBiEg"); this.shape_39.graphics.f("#282724").s().p("AgzIaIAAAAQnxhSBFn7IAAgBQBqmzFag5IABAAQD1gQCBCFQCBCFALEYIAAABQgPE6iHCKQhpBsixAAQgzAAg4gJgAFEGpQCBiGAPkwIAAgBQgLkPh7iAQh8h/jrAQIABgBQlNA5hmGkQhCHnHdBPIAAAAQDzAnCBiEg");
this.shape_39.setTransform(630.1316,254.8426); this.shape_39.setTransform(630.1316,254.8426);
this.instance_4 = new lib.CachedBmp_43(); this.instance_4 = new lib.CachedBmp_1();
this.instance_4.setTransform(537.75,185.6,0.5,0.5); this.instance_4.setTransform(537.75,185.6,0.5,0.5);
this.instance_5 = new lib.CachedBmp_44(); this.instance_5 = new lib.CachedBmp_2();
this.instance_5.setTransform(494.4,178.25,0.5,0.5); this.instance_5.setTransform(494.4,178.25,0.5,0.5);
this.instance_6 = new lib.CachedBmp_45(); this.instance_6 = new lib.CachedBmp_3();
this.instance_6.setTransform(480.5,178.25,0.5,0.5); this.instance_6.setTransform(480.5,178.25,0.5,0.5);
this.instance_7 = new lib.CachedBmp_46(); this.instance_7 = new lib.CachedBmp_4();
this.instance_7.setTransform(459.05,178.25,0.5,0.5); this.instance_7.setTransform(459.05,178.25,0.5,0.5);
this.timeline.addTween(cjs.Tween.get({}).to({state:[]}).to({state:[{t:this.shape_39},{t:this.shape_38},{t:this.shape_37}]},19).to({state:[{t:this.instance_4}]},30).to({state:[{t:this.instance_5}]},30).to({state:[{t:this.instance_6}]},29).to({state:[{t:this.instance_7}]},5).to({state:[]},7).wait(2)); this.timeline.addTween(cjs.Tween.get({}).to({state:[]}).to({state:[{t:this.shape_39},{t:this.shape_38},{t:this.shape_37}]},19).to({state:[{t:this.instance_4}]},30).to({state:[{t:this.instance_5}]},30).to({state:[{t:this.instance_6}]},29).to({state:[{t:this.instance_7}]},5).to({state:[]},7).wait(2));
@ -1605,13 +1692,13 @@ if (reversed == null) { reversed = false; }
this.shape_5.graphics.f("#264716").s().p("AAEGIQAOjwhBgSIAAAAQhwgUkDBgIAAgBQCFh6CKhLQA9gqgigtQgjguithoIABgCQCvAQCIBLQAuATAbg3QAeg8AOieIACgBQA9CxAsBSQAvBCCQhBQgrAqAAACIAAAAQhhBCAWA5IAAABQAXBRBzBqQhbgjhbAQIAAAAQiUAYhVCjgAgqByQBOASgMDHQBIh8CKgWQA+gLAtAMQg5hCgWhMQgbhABUg/QhbATglg5IAAgBQgohJgoiBQgKBtgaA0QgkBJg+gcIgBAAQh3hCh9gUQCEBKAgArQAwA9hQA3IgBAAQh3BBhiBRQDLhQBsATIAAAAIABAAg"); this.shape_5.graphics.f("#264716").s().p("AAEGIQAOjwhBgSIAAAAQhwgUkDBgIAAgBQCFh6CKhLQA9gqgigtQgjguithoIABgCQCvAQCIBLQAuATAbg3QAeg8AOieIACgBQA9CxAsBSQAvBCCQhBQgrAqAAACIAAAAQhhBCAWA5IAAABQAXBRBzBqQhbgjhbAQIAAAAQiUAYhVCjgAgqByQBOASgMDHQBIh8CKgWQA+gLAtAMQg5hCgWhMQgbhABUg/QhbATglg5IAAgBQgohJgoiBQgKBtgaA0QgkBJg+gcIgBAAQh3hCh9gUQCEBKAgArQAwA9hQA3IgBAAQh3BBhiBRQDLhQBsATIAAAAIABAAg");
this.shape_5.setTransform(305.275,303.7375); this.shape_5.setTransform(305.275,303.7375);
this.instance_2 = new lib.CachedBmp_70(); this.instance_2 = new lib.CachedBmp_28();
this.instance_2.setTransform(225.5,226.65,0.5,0.5); this.instance_2.setTransform(225.5,226.65,0.5,0.5);
this.instance_3 = new lib.CachedBmp_71(); this.instance_3 = new lib.CachedBmp_29();
this.instance_3.setTransform(477.55,226.65,0.5,0.5); this.instance_3.setTransform(477.55,226.65,0.5,0.5);
this.instance_4 = new lib.CachedBmp_72(); this.instance_4 = new lib.CachedBmp_30();
this.instance_4.setTransform(231.25,226.65,0.5,0.5); this.instance_4.setTransform(231.25,226.65,0.5,0.5);
this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.shape_5},{t:this.shape_4},{t:this.shape_3},{t:this.shape_2},{t:this.shape_1},{t:this.shape}]}).to({state:[{t:this.instance_2}]},120).to({state:[{t:this.instance_3}]},10).to({state:[{t:this.instance_4}]},119).wait(411)); this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.shape_5},{t:this.shape_4},{t:this.shape_3},{t:this.shape_2},{t:this.shape_1},{t:this.shape}]}).to({state:[{t:this.instance_2}]},120).to({state:[{t:this.instance_3}]},10).to({state:[{t:this.instance_4}]},119).wait(411));
@ -1703,7 +1790,7 @@ if (reversed == null) { reversed = false; }
this.instance = new lib._1353j4iigfjfkg("synched",0); this.instance = new lib._1353j4iigfjfkg("synched",0);
this.instance.setTransform(1883,982.6,1,1,0,0,0,1883,982.6); this.instance.setTransform(1883,982.6,1,1,0,0,0,1883,982.6);
this.timeline.addTween(cjs.Tween.get(this.instance).wait(255).to({startPosition:255},0).to({x:847,startPosition:274},19).wait(85).to({startPosition:359},0).to({x:7,startPosition:379},20).wait(185).to({startPosition:564},0).to({x:-577,startPosition:581},17).wait(918).to({startPosition:1499},0).to({_off:true},1).wait(1)); this.timeline.addTween(cjs.Tween.get(this.instance).wait(255).to({startPosition:255},0).to({x:847,startPosition:274},19).wait(85).to({startPosition:359},0).to({x:7,startPosition:379},20).wait(185).to({startPosition:564},0).to({x:-577,startPosition:581},17).wait(28).to({startPosition:609},0).to({_off:true},1).wait(891));
this._renderFirstFrame(); this._renderFirstFrame();
@ -1717,58 +1804,94 @@ if (reversed == null) { reversed = false; }
var props = new Object(); var props = new Object();
props.mode = mode; props.mode = mode;
props.startPosition = startPosition; props.startPosition = startPosition;
props.labels = {}; props.labels = {"action-1":2,"action-2":21,"action-3":50,"action-4":81,"action-5":111,"action-6":151,"action-7":181,"action-8":209,"action-9":283,"action-10":328,"action-11":399,"action-12":445,"action-13":476,"action-14":505,"action-15":534,"action-16":606};
props.loop = loop; props.loop = loop;
props.reversed = reversed; props.reversed = reversed;
cjs.MovieClip.apply(this,[props]); cjs.MovieClip.apply(this,[props]);
// timeline functions: // timeline functions:
this.frame_0 = function() { this.frame_2 = function() {
this.stop(); this.stop();
} }
this.frame_19 = function() { this.frame_21 = function() {
this.stop(); this.stop();
} }
this.frame_50 = function() { this.frame_50 = function() {
this.stop(); this.stop();
} }
this.frame_79 = function() { this.frame_81 = function() {
this.stop();
}
this.frame_111 = function() {
this.stop(); this.stop();
} }
this.frame_151 = function() {
this.stop();
}
this.frame_181 = function() {
this.stop();
}
this.frame_209 = function() {
this.stop();
}
this.frame_283 = function() {
this.stop();
}
this.frame_328 = function() {
this.stop();
}
this.frame_399 = function() {
this.stop();
}
this.frame_445 = function() {
this.stop();
}
this.frame_476 = function() {
this.stop();
}
this.frame_505 = function() {
this.stop();
}
this.frame_534 = function() {
this.stop();
}
this.frame_606 = function() {
this.stop()
}
// actions tween: // actions tween:
this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(19).call(this.frame_19).wait(31).call(this.frame_50).wait(29).call(this.frame_79).wait(1421)); this.timeline.addTween(cjs.Tween.get(this).wait(2).call(this.frame_2).wait(19).call(this.frame_21).wait(29).call(this.frame_50).wait(31).call(this.frame_81).wait(30).call(this.frame_111).wait(40).call(this.frame_151).wait(30).call(this.frame_181).wait(28).call(this.frame_209).wait(74).call(this.frame_283).wait(45).call(this.frame_328).wait(71).call(this.frame_399).wait(46).call(this.frame_445).wait(31).call(this.frame_476).wait(29).call(this.frame_505).wait(29).call(this.frame_534).wait(72).call(this.frame_606).wait(4));
// mask // mask
this.shape = new cjs.Shape(); this.shape = new cjs.Shape();
this.shape.graphics.f("#000000").s().p("EjxyDCfMAAAmE9MHjlAAAMAAAGE9gEh1CBEhMDH/AAAMAAAhwfMh1rAAAIABAAMg5XAAAIAAAAI4+AAg"); this.shape.graphics.f("#000000").s().p("EjxyDCfMAAAmE9MHjlAAAMAAAGE9gEh1CBEhMDH/AAAMAAAhwfMh1rAAAIABAAMg5XAAAIAAAAI4+AAg");
this.shape.setTransform(749.1,281.525); this.shape.setTransform(749.1,281.525);
this.timeline.addTween(cjs.Tween.get(this.shape).wait(1500)); this.timeline.addTween(cjs.Tween.get(this.shape).wait(610));
// score // score
this.instance = new lib._218d7f87fgfh("single",20); this.instance = new lib._218d7f87fgfh("single",20);
this.instance.setTransform(771.2,337.55,1,1,0,0,0,30,26); this.instance.setTransform(771.2,337.55,1,1,0,0,0,30,26);
this.timeline.addTween(cjs.Tween.get(this.instance).wait(19).to({startPosition:0},0).wait(31).to({startPosition:1},0).wait(29).to({startPosition:2},0).wait(30).to({startPosition:3},0).wait(40).to({startPosition:4},0).wait(30).to({startPosition:5},0).wait(30).to({startPosition:6},0).wait(30).to({startPosition:7},0).wait(65).to({startPosition:8},0).wait(47).to({startPosition:9},0).wait(78).to({startPosition:10},0).wait(30).to({startPosition:11},0).wait(30).to({startPosition:12},0).wait(30).to({startPosition:13},0).wait(35).to({startPosition:14},0).wait(946)); this.timeline.addTween(cjs.Tween.get(this.instance).wait(2).to({startPosition:20},0).wait(19).to({startPosition:0},0).wait(29).to({startPosition:1},0).wait(31).to({startPosition:2},0).wait(30).to({startPosition:3},0).wait(40).to({startPosition:4},0).wait(30).to({startPosition:5},0).wait(28).to({startPosition:6},0).wait(31).to({startPosition:7},0).wait(88).to({startPosition:8},0).wait(31).to({startPosition:9},0).wait(86).to({startPosition:10},0).wait(31).to({startPosition:11},0).wait(29).to({startPosition:12},0).wait(29).to({startPosition:13},0).wait(32).to({startPosition:14},0).wait(44));
// score-bg // score-bg
this.instance_1 = new lib.CachedBmp_80(); this.instance_1 = new lib.CachedBmp_38();
this.instance_1.setTransform(983.7,543.35,0.5,0.5); this.instance_1.setTransform(983.7,543.35,0.5,0.5);
this.instance_2 = new lib.元件7(); this.instance_2 = new lib.元件7();
this.instance_2.setTransform(349.75,10.45); this.instance_2.setTransform(349.75,10.45);
this.instance_3 = new lib.CachedBmp_79(); this.instance_3 = new lib.CachedBmp_37();
this.instance_3.setTransform(159.75,0,0.5,0.5); this.instance_3.setTransform(159.75,0,0.5,0.5);
this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_3},{t:this.instance_2},{t:this.instance_1}]}).wait(1500)); this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_3},{t:this.instance_2},{t:this.instance_1}]}).wait(610));
// main // main
this.instance_4 = new lib._214545s4d54g的("synched",0); this.instance_4 = new lib._214545s4d54g的("synched",0);
this.instance_4.setTransform(1865.8,982.1,1,1,0,0,0,1883,982.6); this.instance_4.setTransform(1865.8,982.1,1,1,0,0,0,1883,982.6);
this.timeline.addTween(cjs.Tween.get(this.instance_4).wait(1500)); this.timeline.addTween(cjs.Tween.get(this.instance_4).wait(610));
this._renderFirstFrame(); this._renderFirstFrame();

47
src/classes/again.js

@ -0,0 +1,47 @@
/**
* 再玩一次类
* @property {object} lib 库对象
* @property {object} btnAgain 面板元素对象
*/
function Again() {
this.lib = library;
this.btnAgain = null;
}
Again.of = (function () {
let instance = null;
return function () {
if (!instance) {
instance = new Again();
}
instance.init();
return instance;
};
})();
// 初始化
Again.prototype.init = function () {
this.showAgainBtn();
};
// 渲染背景面板
Again.prototype.showAgainBtn = function () {
const lib = this.lib;
const btnAgain = new lib.btnAgain();
btnAgain.x = lib.properties.width / 2;
btnAgain.y = lib.properties.height / 2 + 150;
this.btnAgain = btnAgain;
this.btnAgain.addEventListener(
'click',
function () {
if (config.mode === 0) {
againMessage();
} else {
location.reload();
}
},
false,
);
stage.addChild(btnAgain);
};

9
js/classes/back.js → src/classes/back.js

@ -4,11 +4,16 @@ function Back() {
this.back = null; this.back = null;
} }
Back.of = function () { Back.of = (function () {
const instance = new Back(); let instance = null;
return function () {
if (!instance) {
instance = new Back();
}
instance.init(); instance.init();
return instance; return instance;
}; };
})();
Back.prototype.init = function () { Back.prototype.init = function () {
const target = new this.lib.btnBack(); const target = new this.lib.btnBack();

22
js/classes/count.js → src/classes/count.js

@ -9,8 +9,9 @@
* @property {number} default 倒计时值 * @property {number} default 倒计时值
* @property {number} timer 计时器id * @property {number} timer 计时器id
* @property {object} lib 库对象 * @property {object} lib 库对象
* @property {function} countEndCallback 结束回调函数
*/ */
function Count(startTime = Date.now(), defaultCount = config.count || 5) { function Count(countEndCallback, startTime, defaultCount = config.count || 5) {
this.default = defaultCount; this.default = defaultCount;
this.startTime = startTime; this.startTime = startTime;
@ -18,19 +19,26 @@ function Count(startTime = Date.now(), defaultCount = config.count || 5) {
this.text = null; this.text = null;
this.timer = null; this.timer = null;
this.lib = library; this.lib = library;
this.countEndCallback = countEndCallback;
} }
/** /**
* 静态方法 封装new init方法 * 静态方法 封装new init方法
* 使用时直接调用此方法 * 使用时直接调用此方法
* @param {function} countEndCallback 倒计时结束的回调函数
* @param {number} defaultCount 倒计时时长 * @param {number} defaultCount 倒计时时长
* @returns * @returns
*/ */
Count.of = function (defaultCount) { Count.of = (function () {
const instance = new Count(defaultCount); let instance = null;
return function (countEndCallback, startTime = Date.now(), defaultCount) {
if (!instance) {
instance = new Count(countEndCallback, startTime, defaultCount);
}
instance.init(); instance.init();
return instance; return instance;
}; };
})();
// 初始化方法 // 初始化方法
Count.prototype.init = function () { Count.prototype.init = function () {
@ -64,12 +72,12 @@ Count.prototype.renderContent = function () {
// 更新倒计时文本 // 更新倒计时文本
Count.prototype.update = function (time) { Count.prototype.update = function (time) {
if (time <= 0) { if (time <= 0) {
console.log(time);
// 发送倒计时结束的消息 // 发送倒计时结束的消息
clearInterval(this.timer); clearInterval(this.timer);
stage.removeChild(this.text); stage.removeChild(this.text);
stage.removeChild(this.modal); stage.removeChild(this.modal);
// sendEndCountRequest(); // 发送倒计时结束的消息 // sendEndCountRequest(); // 发送倒计时结束的消息
this.countEnd();
return; return;
} }
@ -86,3 +94,9 @@ Count.prototype.renderText = function (time) {
this.text = text; this.text = text;
stage.addChild(text); stage.addChild(text);
}; };
// 结束倒计时 开始游戏
Count.prototype.countEnd = function () {
// 执行结束后的回调
this.countEndCallback();
};

47
src/classes/demo.js

@ -0,0 +1,47 @@
/**
* 演示模式类
* @property {object} lib 库对象
* @property {object} stopDemo 面板元素对象
*/
function Demo() {
this.lib = library;
this.stopDemo = null;
}
Demo.of = (function () {
let instance = null;
return function () {
if (!instance) {
instance = new Demo();
}
instance.init();
return instance;
};
})();
// 初始化
Demo.prototype.init = function () {
this.showStopDemo();
};
// 显示演示模式按钮
Demo.prototype.showStopDemo = function () {
const lib = this.lib;
const stopDemo = new lib.stopDemo();
stopDemo.x = 50;
stopDemo.y = lib.properties.height - 100;
this.stopDemo = stopDemo;
// 关闭演示模式
this.stopDemo.addEventListener(
'click',
function () {
stage.removeChild(stopDemo);
location.hash = '';
location.reload();
isDemo = false;
},
false,
);
stage.addChild(stopDemo);
};

10
js/classes/end.js → src/classes/end.js

@ -21,16 +21,22 @@ function End(score) {
* @param {number} score 最终得分 * @param {number} score 最终得分
* @returns * @returns
*/ */
End.of = function (score) { End.of = (function () {
const instance = new End(score); let instance = null;
return function (score) {
if (!instance) {
instance = new End(score);
}
instance.init(); instance.init();
return instance; return instance;
}; };
})();
// 初始化 // 初始化
End.prototype.init = function () { End.prototype.init = function () {
this.renderModal(); this.renderModal();
this.renderText(this.score); this.renderText(this.score);
Again.of();
}; };
// 渲染背景面板 // 渲染背景面板

2
js/classes/level.js → src/classes/level.js

@ -2,7 +2,7 @@
* 难度等级类 * 难度等级类
* @param {number} level 等级数字代码 * @param {number} level 等级数字代码
*/ */
function Level(level = config.level || 1) { function Level(level) {
this.lib = library; this.lib = library;
this.level = level; this.level = level;

32
js/classes/main.js → src/classes/main.js

@ -26,11 +26,16 @@ function Main(endCallback, max) {
* @param {function} endCallback 游戏结束的回调函数 * @param {function} endCallback 游戏结束的回调函数
* @param {number} max 最多运动次数 * @param {number} max 最多运动次数
*/ */
Main.of = function (endCallback, max = config.times) { Main.of = (function () {
const instance = new Main(endCallback, max); let instance = null;
return function (endCallback, max = config.times) {
if (!instance) {
instance = new Main(endCallback, max);
}
instance.init(); instance.init();
return instance; return instance;
}; };
})();
// 初始方法 // 初始方法
Main.prototype.init = function () { Main.prototype.init = function () {
@ -43,14 +48,31 @@ Main.prototype.init = function () {
// 限制了两次动作间隔时间不能少于2s // 限制了两次动作间隔时间不能少于2s
// 游戏状态在进行中才能触发 // 游戏状态在进行中才能触发
// play次数 >= 最多完成次数 调用结束的callback // play次数 >= 最多完成次数 调用结束的callback
Main.prototype.play = function () { Main.prototype.play = function (direction) {
if (Date.now() - this.prevTime <= 2000 || state !== 1) return; if (Date.now() - this.prevTime <= 1200 || state !== 1) return;
// if (state !== 1) return;
this.element.play(); this.element.play();
this.times += 1; this.times += 1;
this.computeScore(this.times, direction);
this.prevTime = Date.now(); this.prevTime = Date.now();
if (this.times >= this.max) { if (this.times >= this.max) {
this.times = this.max; this.times = this.max;
this.endCallback(); this.endCallback();
} }
console.log('this.times: ', this.times); };
/**
* 计算当前的次数与分值 并发送给父窗口
* @param {number} times 当前动作执行成功的次数
* @param {number} direction play code
*/
Main.prototype.computeScore = function (times, direction = 0) {
const directionTarget = config.config.scores.find(item => item.direction === direction);
config.currentTimes = times;
config.currentScore += directionTarget.score;
if (config.mode === 0) {
sendMessage({ event: 'play', data: { currentTimes: times, currentScore: config.currentScore } });
}
}; };

47
src/classes/sound.js

@ -0,0 +1,47 @@
// 音频处理类;
function Sound() {
this.lib = library;
this.music = {};
}
Sound.of = (function () {
let instance = null;
return function () {
if (!instance) {
instance = new Sound();
}
instance.init();
return instance;
};
})();
Sound.prototype.init = function () {
createjs.Sound.alternateExtensions = ['mp3'];
const sounds = [{ src: 'sounds/bgmMusic.mp3', id: 'bgm' }];
const _this = this;
createjs.Sound.addEventListener('fileload', function (event) {
_this.music[event.id] = createjs.Sound.createInstance(event.id);
});
createjs.Sound.registerSounds(sounds, './');
this.playBgm();
};
Sound.prototype.playBgm = function () {
this.music.bgm && this.music.bgm.play({ loop: -1, volume: 0.3 }); // 播放背景音乐
};
// let music = {};
// function initSound() {
// createjs.Sound.alternateExtensions = ['mp3'];
// const sounds = [
// { src: 'public/sounds/bgmMusic.mp3', id: 'bgm' },
// { src: 'public/sounds/excitationMusic.mp3', id: 'excitation' },
// { src: 'public/sounds/amazing.mp3', id: 'amazing' },
// { src: 'public/sounds/unbelievable.mp3', id: 'unbelievable' },
// ];
// createjs.Sound.addEventListener('fileload', function (event) {
// music[event.id] = createjs.Sound.createInstance(event.id);
// });
// createjs.Sound.registerSounds(sounds, '../../');
// }

55
src/classes/suspend.js

@ -0,0 +1,55 @@
/**
* 暂停游戏类暂停继续游戏
* @property {object} lib 库对象
* @property {object} suspend 面板元素对象
*/
function Suspend() {
this.lib = library;
this.suspend = null;
}
Suspend.of = (function () {
let instance = null;
return function () {
if (!instance) {
instance = new Suspend();
}
instance.init();
return instance;
};
})();
// 初始化
Suspend.prototype.init = function () {
this.suspendGame();
};
// 暂停游戏按钮
Suspend.prototype.suspendGame = function () {
// const lib = this.lib;
const suspend = new this.lib.suspend();
suspend.x = 50;
suspend.y = this.lib.properties.height - 100;
this.suspend = suspend;
const _this = this;
// 继续游戏
this.suspend.addEventListener(
'click',
function () {
_this.hide();
continueMessage();
},
false,
);
// stage.addChild(this.suspend);
// stage.removeChild(this.suspend);
};
Suspend.prototype.hide = function () {
stage.removeChild(this.suspend);
};
Suspend.prototype.show = function () {
stage.addChild(this.suspend);
};

42
js/classes/time.js → src/classes/time.js

@ -35,11 +35,16 @@ function Time(endCallback, duration, count) {
* @param {number} count 游戏倒计时时长 * @param {number} count 游戏倒计时时长
* @returns * @returns
*/ */
Time.of = function (endCallback, duration = config.duration || 60, count = config.count || 5) { Time.of = (function () {
const instance = new Time(endCallback, duration, count); let instance = null;
return function (endCallback, duration = config.duration || 60, count = config.count || 5) {
if (!instance) {
instance = new Time(endCallback, duration, count);
}
instance.init(); instance.init();
return instance; return instance;
}; };
})();
// 初始化 // 初始化
Time.prototype.init = function () { Time.prototype.init = function () {
@ -47,15 +52,30 @@ Time.prototype.init = function () {
this.renderText(this.duration); this.renderText(this.duration);
}; };
// 设置时长
Time.prototype.setDuration = function (duration) {
this.duration = duration;
this.renderText(this.duration);
};
// 开始游戏 开始倒计时 // 开始游戏 开始倒计时
Time.prototype.start = function (startTime = Date.now()) { Time.prototype.start = function (startTime = Date.now()) {
this.started = true; this.started = true;
state = 1; state = 1;
this.startTime = startTime; this.startTime = startTime;
this.duration = leftDuration ? leftDuration : this.duration;
this.update(); this.update();
}; };
// 开始游戏 开始倒计时 // 暂停游戏 暂停倒计时
Time.prototype.pause = function () {
this.started = false;
state = 3;
clearTimeout(this.timerId);
this.timerId = null;
};
// 结束游戏 结束倒计时
Time.prototype.end = function () { Time.prototype.end = function () {
this.started = false; this.started = false;
this.timerId && clearTimeout(this.timerId); this.timerId && clearTimeout(this.timerId);
@ -77,6 +97,7 @@ Time.prototype.renderBg = function () {
// 渲染文本 // 渲染文本
Time.prototype.renderText = function (time) { Time.prototype.renderText = function (time) {
if (this.text) stage.removeChild(this.text);
const text = new createjs.Text(time, 'bold 40px Arial', '#823d16'); const text = new createjs.Text(time, 'bold 40px Arial', '#823d16');
text.x = this.lib.properties.width - 100; text.x = this.lib.properties.width - 100;
text.y = 100; text.y = 100;
@ -89,17 +110,16 @@ Time.prototype.renderText = function (time) {
// 更新文本 // 更新文本
Time.prototype.update = function () { Time.prototype.update = function () {
if (this.timerId || !this.started) return; if (this.timerId || !this.started) return;
// const endTime = this.startTime + this.count * 1000 + this.duration * 1000; // const endTime = this.startTime + this.duration * 1000;
const endTime = this.startTime + this.duration * 1000;
// console.log('endTime: ', endTime);
this.timerId = setInterval(() => { this.timerId = setInterval(() => {
let leftTime = Math.round((endTime - Date.now()) / 1000); // let leftTime = Math.round((endTime - Date.now()) / 1000);
console.log('leftTime: ', leftTime); this.duration--;
leftDuration = this.duration;
this.text && stage.removeChild(this.text); this.text && stage.removeChild(this.text);
if (leftTime <= 0) { if (this.duration <= 0) {
leftTime = 0; this.duration = 0;
this.end(); this.end();
} }
this.renderText(leftTime); this.renderText(this.duration);
}, 1000); }, 1000);
}; };

57
src/custom.js

@ -0,0 +1,57 @@
const config = {
count: 5, // 默认倒计时时长
duration: 60, // 总时长 s
total: 100, // 总分
times: 15, // 动作次数
level: 1, // 游戏难度级别
mode: 1, // 模式 0-> 正常模式 1-> 演示模式
currentScore: 0, // 当前得分
currentTimes: 0, // 当前次数
config: {
scores: [
{ direction: 0, score: 5 },
{ direction: 1, score: 10 },
{ direction: 2, score: 8 },
],
directions: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2],
}, // 得分配置
};
let library = null;
let state = 0; // 游戏状态 0->未开始 1->进行中 2->结束 3->暂停
let isDemo = false; // 是不是演示模式
let leftDuration = null; // 暂停时的时间
function initStage(lib) {
library = lib;
window.main = Main.of(gameOver); // 初始化鸟等
window.timeInstance = Time.of(gameOver); // 初始化游戏时间
window.soundInstance = Sound.of(); // 初始化音频
Level.of(config.level); // 游戏难度级别
Back.of(); // 返回按钮
isHash();
window.suspend = Suspend.of();
window.addEventListener(
'click',
function () {
if (!window.soundInstance) return;
window.soundInstance.playBgm();
},
false,
);
}
// 游戏结束 显示结束得分面板
function gameOver() {
state = 2;
const times = main.times;
setTimeout(() => {
End.of(config.currentScore || 0);
if (config.mode === 0) {
finishMessage(config.currentScore, times);
}
}, 2000);
}

3
js/index.js → src/index.js

@ -24,10 +24,11 @@ function handleFileLoad(evt, comp) {
function handleComplete(evt, comp) { function handleComplete(evt, comp) {
//This function is always called, irrespective of the content. You can use the variable "stage" after it is created in token create_stage. //This function is always called, irrespective of the content. You can use the variable "stage" after it is created in token create_stage.
var lib = comp.getLibrary(); var lib = comp.getLibrary();
var ss = comp.getSpriteSheet(); var ss = comp.getSpriteSheet();
var queue = evt.target; var queue = evt.target;
var ssMetadata = lib.ssMetadata; var ssMetadata = lib.ssMetadata;
for (i = 0; i < ssMetadata.length; i++) { for (let i = 0; i < ssMetadata.length; i++) {
ss[ssMetadata[i].name] = new createjs.SpriteSheet({ images: [queue.getResult(ssMetadata[i].name)], frames: ssMetadata[i].frames }); ss[ssMetadata[i].name] = new createjs.SpriteSheet({ images: [queue.getResult(ssMetadata[i].name)], frames: ssMetadata[i].frames });
} }
var preloaderDiv = document.getElementById('_preload_div_'); var preloaderDiv = document.getElementById('_preload_div_');

131
src/message.js

@ -0,0 +1,131 @@
window.addEventListener(
'message',
function (e) {
const res = e.data;
console.log('子->接受: ', res);
switch (res.event) {
case 'start':
startGame(res.data);
return;
case 'play':
playGame(res.data);
return;
case 'pause':
pauseGame(res.data);
return;
case 'continue':
continueGame(res.data);
return;
default:
finishGame(res.data);
return;
}
function startGame(data) {
if (state === 2) {
location.reload();
return;
}
const { count, game, status, param } = data;
config.count = count.duration;
config.duration = game.duration;
config.total = game.totalScore;
config.times = game.totalTimes;
config.level = game.level;
config.config = game.config;
config.mode = game.mode;
window.timeInstance.setDuration(game.duration);
Level.of(config.level);
if (config.mode === 0) {
// 开始倒计时
Count.of(countOver);
} else {
sevenClick();
}
}
function playGame(data) {
if (state !== 1) return;
const { status, param } = data;
console.log('param: ', param);
// config.currentScore = score;
// config.currentTimes = times;
state = status;
if (config.config.directions[config.currentTimes] === param.direction) {
main.play(param.direction);
} else {
alert('动作不匹配');
}
}
function pauseGame(data) {
if (state !== 1) return;
state = data.status;
window.suspend.show();
window.timeInstance.pause();
}
function continueGame(data) {
if (state !== 3) return;
state = data.status;
window.suspend.hide();
window.timeInstance.start();
}
function finishGame(data) {
const { score, times, status, param } = data;
state = status;
// config.total = score;
// config.times = times;
End.of(score || 0);
window.timeInstance.setDuration(0);
}
},
false,
);
// 发消息
function sendMessage(data) {
if (!data) {
return alert('错误: 发送消息数据为空');
}
console.log('子->发送: ', data);
top.postMessage(data, document.referrer);
}
// 发送继续游戏消息
function continueMessage() {
const data = {
event: 'continue',
data: {
status: 1, // 1 -> 进行中
},
};
sendMessage(data);
}
// 发送游戏结束消息
function finishMessage(score, times) {
const data = {
event: 'finish',
data: {
score: score, // 得分
times: times, // 次数
status: 2, // 游戏状态 0 1 2
param: {}, // 额外个性化参数
},
};
sendMessage(data);
}
// 发送再来一次消息
function againMessage() {
const data = {
event: 'again',
data: {
param: {}, // 额外个性化参数
},
};
sendMessage(data);
}

57
src/test.js

@ -0,0 +1,57 @@
// 判断是否在演示模式 能否直接开始游戏
function isHash() {
if (location.hash && location.hash === '#p') {
isDemo = true;
Demo.of();
Count.of(countOver);
} else {
// 连点7次触发倒计时
startGame();
}
}
function startGame() {
var count = 0,
timer;
document.onclick = function () {
if (isDemo || config.mode !== 1) return;
if (count < 6) {
if (timer) {
clearTimeout(timer);
}
count++;
timer = setTimeout(function () {
count = 0;
}, 300);
} else if (count === 6) {
count = 0;
clearTimeout(timer);
sevenClick();
}
};
}
function sevenClick() {
isDemo = true;
Count.of(countOver);
addHash();
}
// 倒计时结束 开始游戏
function countOver() {
timeInstance.start();
}
// 添加hash值
function addHash() {
location.hash = '#p';
Demo.of();
}
function test() {
document.addEventListener('click', () => {
if (!isDemo) return;
main.play(config.config.directions[config.currentTimes]);
});
}
test();
Loading…
Cancel
Save