1234567891011121314151617181920212223242526272829303132 |
- import Pool from './base/pool'
- let instance
- /**
- * 全局状态管理器
- */
- export default class DataBus {
- constructor() {
- if ( instance )
- return instance
- instance = this
- this.pool = new Pool()
- this.reset()
- }
- reset() {
- this.score = 0
- this.animations = []
- this.gameOver = false
- this.box = []
-
- }
- }
|