├── bin
├── version.json
├── js
│ ├── framework
│ │ ├── mvc
│ │ │ ├── org
│ │ │ │ └── puremvc
│ │ │ │ │ └── typescript
│ │ │ │ │ ├── interfaces
│ │ │ │ │ ├── INotifier.js
│ │ │ │ │ ├── INotification.js
│ │ │ │ │ ├── IModel.js
│ │ │ │ │ ├── IProxy.js
│ │ │ │ │ ├── IController.js
│ │ │ │ │ ├── IObserver.js
│ │ │ │ │ ├── IModel.js.map
│ │ │ │ │ ├── INotifier.js.map
│ │ │ │ │ ├── IProxy.js.map
│ │ │ │ │ ├── INotification.js.map
│ │ │ │ │ ├── IObserver.js.map
│ │ │ │ │ ├── IController.js.map
│ │ │ │ │ ├── ICommand.js.map
│ │ │ │ │ ├── ICommand.js
│ │ │ │ │ ├── IMediator.js.map
│ │ │ │ │ ├── IView.js.map
│ │ │ │ │ ├── IMediator.js
│ │ │ │ │ ├── IFacade.js.map
│ │ │ │ │ ├── IView.js
│ │ │ │ │ └── IFacade.js
│ │ │ │ │ ├── patterns
│ │ │ │ │ ├── command
│ │ │ │ │ │ ├── SimpleCommand.js.map
│ │ │ │ │ │ ├── MacroCommand.js.map
│ │ │ │ │ │ └── SimpleCommand.js
│ │ │ │ │ ├── observer
│ │ │ │ │ │ ├── Notifier.js.map
│ │ │ │ │ │ ├── Observer.js.map
│ │ │ │ │ │ ├── Notification.js.map
│ │ │ │ │ │ └── Notifier.js
│ │ │ │ │ ├── proxy
│ │ │ │ │ │ └── Proxy.js.map
│ │ │ │ │ ├── mediator
│ │ │ │ │ │ └── Mediator.js.map
│ │ │ │ │ └── facade
│ │ │ │ │ │ └── Facade.js.map
│ │ │ │ │ └── core
│ │ │ │ │ ├── Model.js.map
│ │ │ │ │ ├── Controller.js.map
│ │ │ │ │ └── View.js.map
│ │ │ ├── SubMediator.js.map
│ │ │ ├── BaseProxy.js.map
│ │ │ ├── BaseCommand.js.map
│ │ │ ├── BaseProxy.js
│ │ │ ├── BaseCommand.js
│ │ │ ├── SubMediator.js
│ │ │ └── BaseMediator.js.map
│ │ ├── presence
│ │ │ ├── IPresence.js.map
│ │ │ ├── IPresence.js
│ │ │ ├── LocalPresence.js.map
│ │ │ └── LocalPresence.js
│ │ ├── loaders
│ │ │ ├── IProgressListener.js.map
│ │ │ ├── FileResourceLoader.js.map
│ │ │ ├── ViewResourceLoader.js.map
│ │ │ ├── SkinTraversal.js.map
│ │ │ ├── BaseResourceLoader.js.map
│ │ │ ├── GroupResourceLoader.js.map
│ │ │ ├── IProgressListener.js
│ │ │ └── SkinTraversal.js
│ │ ├── abc
│ │ │ ├── DisplayObject.js.map
│ │ │ ├── Singleton.js.map
│ │ │ ├── DisplayObject.js
│ │ │ └── Singleton.js
│ │ ├── manager
│ │ │ ├── sound
│ │ │ │ ├── BaseSoundPlayer.js.map
│ │ │ │ ├── EffectPlayer.js.map
│ │ │ │ ├── MusicPlayer.js.map
│ │ │ │ ├── SoundManager.js.map
│ │ │ │ ├── BaseSoundPlayer.js
│ │ │ │ ├── EffectPlayer.js
│ │ │ │ ├── MusicPlayer.js
│ │ │ │ └── SoundManager.js
│ │ │ ├── resource
│ │ │ │ ├── ResourceManager.js.map
│ │ │ │ └── ResourceManager.js
│ │ │ └── ticker
│ │ │ │ ├── SimpleSignal.js.map
│ │ │ │ ├── TickerManager.js.map
│ │ │ │ ├── SimpleSignal.js
│ │ │ │ └── TickerManager.js
│ │ ├── ApplicationFacadeBase.js.map
│ │ ├── pool
│ │ │ ├── TickerPool.js.map
│ │ │ ├── HttpClientPool.js.map
│ │ │ ├── ObjectPool.js.map
│ │ │ ├── TickerPool.js
│ │ │ └── HttpClientPool.js
│ │ ├── AppContextMediator.js.map
│ │ ├── network
│ │ │ └── HttpClient.js.map
│ │ ├── ApplicationFacadeBase.js
│ │ └── AppContextMediator.js
│ ├── app
│ │ ├── model
│ │ │ ├── GameProxy.js.map
│ │ │ └── GameProxy.js
│ │ ├── controller
│ │ │ ├── StartupCommand.js.map
│ │ │ └── StartupCommand.js
│ │ ├── ApplicationFacade.js.map
│ │ ├── view
│ │ │ ├── LoadingMediator.js.map
│ │ │ └── TestMediator.js.map
│ │ └── ApplicationFacade.js
│ ├── LayaUISample.js.map
│ └── LayaUISample.js
├── res
│ └── atlas
│ │ ├── comp.png
│ │ └── .rec
└── libs
│ ├── min
│ └── laya.d3Plugin.min.js
│ └── laya.d3Plugin.js
├── Framework_YT.laya
├── laya
├── assets
│ └── comp
│ │ ├── bg.png
│ │ ├── blank.png
│ │ ├── html.png
│ │ ├── image.png
│ │ ├── label.png
│ │ ├── radio.png
│ │ ├── tab.png
│ │ ├── button.png
│ │ ├── hscroll.png
│ │ ├── hslider.png
│ │ ├── vscroll.png
│ │ ├── vslider.png
│ │ ├── btn_close.png
│ │ ├── checkbox.png
│ │ ├── clip_num.png
│ │ ├── combobox.png
│ │ ├── hscroll$up.png
│ │ ├── linkbutton.png
│ │ ├── progress.png
│ │ ├── radiogroup.png
│ │ ├── textarea.png
│ │ ├── textinput.png
│ │ ├── vscroll$up.png
│ │ ├── hscroll$bar.png
│ │ ├── hscroll$down.png
│ │ ├── hslider$bar.png
│ │ ├── progress$bar.png
│ │ ├── vscroll$bar.png
│ │ ├── vscroll$down.png
│ │ ├── vslider$bar.png
│ │ ├── clip_selectBox.png
│ │ ├── clip_tree_arrow.png
│ │ └── clip_tree_folder.png
└── .laya
├── .laya
├── tasks.json
├── settings.json
└── launch.json
├── src
├── framework
│ ├── abc
│ │ ├── DisplayObject.ts
│ │ └── Singleton.ts
│ ├── mvc
│ │ ├── BaseProxy.ts
│ │ ├── BaseCommand.ts
│ │ ├── org
│ │ │ └── puremvc
│ │ │ │ └── typescript
│ │ │ │ ├── interfaces
│ │ │ │ ├── ICommand.ts
│ │ │ │ ├── INotifier.ts
│ │ │ │ ├── IProxy.ts
│ │ │ │ ├── IModel.ts
│ │ │ │ ├── IObserver.ts
│ │ │ │ ├── INotification.ts
│ │ │ │ ├── IController.ts
│ │ │ │ └── IMediator.ts
│ │ │ │ └── patterns
│ │ │ │ ├── command
│ │ │ │ └── SimpleCommand.ts
│ │ │ │ ├── observer
│ │ │ │ └── Notifier.ts
│ │ │ │ ├── proxy
│ │ │ │ └── Proxy.ts
│ │ │ │ └── mediator
│ │ │ │ └── Mediator.ts
│ │ └── SubMediator.ts
│ ├── ApplicationFacadeBase.ts
│ ├── AppContextMediator.ts
│ ├── loaders
│ │ ├── IProgressListener.ts
│ │ ├── FileResourceLoader.ts
│ │ ├── ViewResourceLoader.ts
│ │ ├── SkinTraversal.ts
│ │ ├── BaseResourceLoader.ts
│ │ └── GroupResourceLoader.ts
│ ├── presence
│ │ ├── IPresence.ts
│ │ └── LocalPresence.ts
│ ├── manager
│ │ ├── sound
│ │ │ ├── EffectPlayer.ts
│ │ │ ├── BaseSoundPlayer.ts
│ │ │ ├── MusicPlayer.ts
│ │ │ └── SoundManager.ts
│ │ ├── ticker
│ │ │ ├── SimpleSignal.ts
│ │ │ └── TickerManager.ts
│ │ └── resource
│ │ │ └── ResourceManager.ts
│ ├── pool
│ │ ├── TickerPool.ts
│ │ └── HttpClientPool.ts
│ └── network
│ │ └── HttpClient.ts
├── app
│ ├── model
│ │ └── GameProxy.ts
│ ├── controller
│ │ └── StartupCommand.ts
│ ├── ApplicationFacade.ts
│ └── view
│ │ ├── LoadingMediator.ts
│ │ └── TestMediator.ts
├── LayaUISample.ts
└── ui
│ └── layaUI.max.all.ts
├── tsconfig.json
└── README.md
/bin/version.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/Framework_YT.laya:
--------------------------------------------------------------------------------
1 | {"proName":"Framework_YT","engineType":0,"proType":1,"layaProType":1}
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/interfaces/INotifier.js:
--------------------------------------------------------------------------------
1 | //# sourceMappingURL=INotifier.js.map
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/interfaces/INotification.js:
--------------------------------------------------------------------------------
1 | //# sourceMappingURL=INotification.js.map
--------------------------------------------------------------------------------
/bin/res/atlas/comp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/bin/res/atlas/comp.png
--------------------------------------------------------------------------------
/laya/assets/comp/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/bg.png
--------------------------------------------------------------------------------
/laya/assets/comp/blank.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/blank.png
--------------------------------------------------------------------------------
/laya/assets/comp/html.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/html.png
--------------------------------------------------------------------------------
/laya/assets/comp/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/image.png
--------------------------------------------------------------------------------
/laya/assets/comp/label.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/label.png
--------------------------------------------------------------------------------
/laya/assets/comp/radio.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/radio.png
--------------------------------------------------------------------------------
/laya/assets/comp/tab.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/tab.png
--------------------------------------------------------------------------------
/laya/assets/comp/button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/button.png
--------------------------------------------------------------------------------
/laya/assets/comp/hscroll.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/hscroll.png
--------------------------------------------------------------------------------
/laya/assets/comp/hslider.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/hslider.png
--------------------------------------------------------------------------------
/laya/assets/comp/vscroll.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/vscroll.png
--------------------------------------------------------------------------------
/laya/assets/comp/vslider.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/vslider.png
--------------------------------------------------------------------------------
/laya/assets/comp/btn_close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/btn_close.png
--------------------------------------------------------------------------------
/laya/assets/comp/checkbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/checkbox.png
--------------------------------------------------------------------------------
/laya/assets/comp/clip_num.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/clip_num.png
--------------------------------------------------------------------------------
/laya/assets/comp/combobox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/combobox.png
--------------------------------------------------------------------------------
/laya/assets/comp/hscroll$up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/hscroll$up.png
--------------------------------------------------------------------------------
/laya/assets/comp/linkbutton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/linkbutton.png
--------------------------------------------------------------------------------
/laya/assets/comp/progress.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/progress.png
--------------------------------------------------------------------------------
/laya/assets/comp/radiogroup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/radiogroup.png
--------------------------------------------------------------------------------
/laya/assets/comp/textarea.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/textarea.png
--------------------------------------------------------------------------------
/laya/assets/comp/textinput.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/textinput.png
--------------------------------------------------------------------------------
/laya/assets/comp/vscroll$up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/vscroll$up.png
--------------------------------------------------------------------------------
/laya/assets/comp/hscroll$bar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/hscroll$bar.png
--------------------------------------------------------------------------------
/laya/assets/comp/hscroll$down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/hscroll$down.png
--------------------------------------------------------------------------------
/laya/assets/comp/hslider$bar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/hslider$bar.png
--------------------------------------------------------------------------------
/laya/assets/comp/progress$bar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/progress$bar.png
--------------------------------------------------------------------------------
/laya/assets/comp/vscroll$bar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/vscroll$bar.png
--------------------------------------------------------------------------------
/laya/assets/comp/vscroll$down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/vscroll$down.png
--------------------------------------------------------------------------------
/laya/assets/comp/vslider$bar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/vslider$bar.png
--------------------------------------------------------------------------------
/laya/assets/comp/clip_selectBox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/clip_selectBox.png
--------------------------------------------------------------------------------
/laya/assets/comp/clip_tree_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/clip_tree_arrow.png
--------------------------------------------------------------------------------
/laya/assets/comp/clip_tree_folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexviolent/H5GameFramework-YT/HEAD/laya/assets/comp/clip_tree_folder.png
--------------------------------------------------------------------------------
/.laya/tasks.json:
--------------------------------------------------------------------------------
1 | {"version":"0.1.0","command":"tsc","isShellCommand":true,"args":["-p",".","--outDir","bin/js"],"showOutput":"silent","problemMatcher":"$tsc"}
--------------------------------------------------------------------------------
/src/framework/abc/DisplayObject.ts:
--------------------------------------------------------------------------------
1 |
2 | /** 游戏显示对象
3 | * 不同游戏引擎可以定义为不同类型,如Laya.Sprite, egret.DisplayObject
4 | */
5 | class DisplayObject extends Laya.Sprite { };
6 |
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/interfaces/IModel.js:
--------------------------------------------------------------------------------
1 | ///
2 | //# sourceMappingURL=IModel.js.map
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/interfaces/IProxy.js:
--------------------------------------------------------------------------------
1 | ///
2 | //# sourceMappingURL=IProxy.js.map
--------------------------------------------------------------------------------
/src/app/model/GameProxy.ts:
--------------------------------------------------------------------------------
1 | class GameProxy extends BaseProxy {
2 | static NAME = "GameProxy";
3 |
4 | constructor() {
5 | super(GameProxy.NAME);
6 | }
7 | }
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/interfaces/IController.js:
--------------------------------------------------------------------------------
1 | ///
2 | //# sourceMappingURL=IController.js.map
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/interfaces/IObserver.js:
--------------------------------------------------------------------------------
1 | ///
2 | //# sourceMappingURL=IObserver.js.map
--------------------------------------------------------------------------------
/bin/js/framework/presence/IPresence.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"IPresence.js","sourceRoot":"","sources":["../../../../src/framework/presence/IPresence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG"}
--------------------------------------------------------------------------------
/.laya/settings.json:
--------------------------------------------------------------------------------
1 | // 将设置放入此文件中以覆盖默认值和用户设置。
2 | {
3 | "editor.fontSize": 16,
4 | "editor.fontFamily": "Source Code Pro Medium",
5 | "typescript.tsdk":"C:/Users/Ali/AppData/Roaming/npm/node_modules/typescript/lib"
6 | }
--------------------------------------------------------------------------------
/bin/js/framework/loaders/IProgressListener.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"IProgressListener.js","sourceRoot":"","sources":["../../../../src/framework/loaders/IProgressListener.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG"}
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/interfaces/IModel.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"IModel.js","sourceRoot":"","sources":["../../../../../../../../src/framework/mvc/org/puremvc/typescript/interfaces/IModel.ts"],"names":[],"mappings":"AAAA,8EAA8E"}
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/interfaces/INotifier.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"INotifier.js","sourceRoot":"","sources":["../../../../../../../../src/framework/mvc/org/puremvc/typescript/interfaces/INotifier.ts"],"names":[],"mappings":""}
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/interfaces/IProxy.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"IProxy.js","sourceRoot":"","sources":["../../../../../../../../src/framework/mvc/org/puremvc/typescript/interfaces/IProxy.ts"],"names":[],"mappings":"AAAA,iFAAiF"}
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/interfaces/INotification.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"INotification.js","sourceRoot":"","sources":["../../../../../../../../src/framework/mvc/org/puremvc/typescript/interfaces/INotification.ts"],"names":[],"mappings":""}
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/interfaces/IObserver.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"IObserver.js","sourceRoot":"","sources":["../../../../../../../../src/framework/mvc/org/puremvc/typescript/interfaces/IObserver.ts"],"names":[],"mappings":"AAAA,qFAAqF"}
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/interfaces/IController.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"IController.js","sourceRoot":"","sources":["../../../../../../../../src/framework/mvc/org/puremvc/typescript/interfaces/IController.ts"],"names":[],"mappings":"AAAA,qFAAqF"}
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/interfaces/ICommand.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"ICommand.js","sourceRoot":"","sources":["../../../../../../../../src/framework/mvc/org/puremvc/typescript/interfaces/ICommand.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,iFAAiF"}
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/interfaces/ICommand.js:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | //# sourceMappingURL=ICommand.js.map
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/interfaces/IMediator.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"IMediator.js","sourceRoot":"","sources":["../../../../../../../../src/framework/mvc/org/puremvc/typescript/interfaces/IMediator.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,iFAAiF"}
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/interfaces/IView.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"IView.js","sourceRoot":"","sources":["../../../../../../../../src/framework/mvc/org/puremvc/typescript/interfaces/IView.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,iFAAiF;AACjF,qFAAqF"}
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/interfaces/IMediator.js:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | //# sourceMappingURL=IMediator.js.map
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/interfaces/IFacade.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"IFacade.js","sourceRoot":"","sources":["../../../../../../../../src/framework/mvc/org/puremvc/typescript/interfaces/IFacade.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,8EAA8E;AAC9E,iFAAiF;AACjF,qFAAqF"}
--------------------------------------------------------------------------------
/bin/js/app/model/GameProxy.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"GameProxy.js","sourceRoot":"","sources":["../../../../src/app/model/GameProxy.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;IAAwB,6BAAS;IAG7B;eACI,kBAAM,SAAS,CAAC,IAAI,CAAC;IACzB,CAAC;IAJM,cAAI,GAAG,WAAW,CAAC;IAK9B,gBAAC;CAAA,AAND,CAAwB,SAAS,GAMhC"}
--------------------------------------------------------------------------------
/bin/js/framework/abc/DisplayObject.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"DisplayObject.js","sourceRoot":"","sources":["../../../../src/framework/abc/DisplayObject.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA;;GAEG;AACH;IAA4B,iCAAW;IAAvC;;IAA0C,CAAC;IAAD,oBAAC;AAAD,CAAC,AAA3C,CAA4B,IAAI,CAAC,MAAM,GAAI;AAAA,CAAC"}
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "commonjs",
4 | "target": "es5",
5 | "sourceMap": true,
6 | "experimentalDecorators": true
7 | },
8 | "lib":[
9 | "es5",
10 | "es2015.promise"
11 | ],
12 | "exclude": [
13 | "node_modules"
14 | ]
15 | }
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/interfaces/IView.js:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | //# sourceMappingURL=IView.js.map
--------------------------------------------------------------------------------
/bin/js/framework/abc/Singleton.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"Singleton.js","sourceRoot":"","sources":["../../../../src/framework/abc/Singleton.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IAAA;IAOA,CAAC;IANU,qBAAW,GAAlB;QACI,IAAI,CAAO,IAAK,CAAC,QAAQ,EAAE;YACjB,IAAK,CAAC,QAAQ,GAAG,IAAI,IAAI,EAAE,CAAC;SACrC;QACD,OAAa,IAAK,CAAC,QAAQ,CAAC;IAChC,CAAC;IACL,gBAAC;AAAD,CAAC,AAPD,IAOC"}
--------------------------------------------------------------------------------
/bin/js/framework/manager/sound/BaseSoundPlayer.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"BaseSoundPlayer.js","sourceRoot":"","sources":["../../../../../src/framework/manager/sound/BaseSoundPlayer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,IAAU,EAAE,CAcX;AAdD,WAAU,EAAE;IACR;;OAEG;IACH;QAAA;QASA,CAAC;QAAD,sBAAC;IAAD,CAAC,AATD,IASC;IATqB,kBAAe,kBASpC,CAAA;AACL,CAAC,EAdS,EAAE,KAAF,EAAE,QAcX"}
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/interfaces/IFacade.js:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | //# sourceMappingURL=IFacade.js.map
--------------------------------------------------------------------------------
/src/app/controller/StartupCommand.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * name;
3 | */
4 | class StartupCommand extends BaseMacroCommand {
5 |
6 | public initializeMacroCommand(): void {
7 | super.initializeMacroCommand();
8 | }
9 |
10 | public execute(note: puremvc.INotification): void {
11 | super.execute(note);
12 | this.facade.registerProxy(new GameProxy());
13 | this.facade.registerMediator(TestMediator.get());
14 | }
15 | }
--------------------------------------------------------------------------------
/bin/js/framework/mvc/SubMediator.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"SubMediator.js","sourceRoot":"","sources":["../../../../src/framework/mvc/SubMediator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;AAEH;;EAEE;AACF;IAA6B,+BAAe;IAA5C;;IAeA,CAAC;IAbU,0BAAI,GAAX,UAAY,aAAkB;QAC1B,IAAI,aAAa,EAAE;YACf,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;SACtC;IACL,CAAC;IAES,4CAAsB,GAAhC;QACI,OAAO,IAAI,CAAC;IAChB,CAAC;IAES,kCAAY,GAAtB;QACI,OAAO,IAAI,CAAC;IAChB,CAAC;IACL,kBAAC;AAAD,CAAC,AAfD,CAA6B,YAAY,GAexC"}
--------------------------------------------------------------------------------
/src/framework/mvc/BaseProxy.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * name;
3 | */
4 | class BaseProxy extends puremvc.Proxy {
5 | data: T;
6 | }
7 |
8 | /**
9 | * 获取Proxy的装饰器
10 | * @param proxy
11 | */
12 | function Proxy(proxy: any) {
13 | return (target: any, propertyName: string) => {
14 | Object.defineProperty(target, propertyName, {
15 | get: () => {
16 | return ApplicationFacade.I.retrieveProxy(proxy.NAME);
17 | }
18 | });
19 | }
20 | }
--------------------------------------------------------------------------------
/bin/js/framework/mvc/BaseProxy.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"BaseProxy.js","sourceRoot":"","sources":["../../../../src/framework/mvc/BaseProxy.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;EAEE;AACF;IAAiC,6BAAa;IAA9C;;IAEA,CAAC;IAAD,gBAAC;AAAD,CAAC,AAFD,CAAiC,OAAO,CAAC,KAAK,GAE7C;AAED;;;GAGG;AACH,SAAS,KAAK,CAAC,KAAU;IACrB,OAAO,UAAC,MAAW,EAAE,YAAoB;QACrC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE;YACxC,GAAG,EAAE;gBACD,OAAO,iBAAiB,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACzD,CAAC;SACJ,CAAC,CAAC;IACP,CAAC,CAAA;AACL,CAAC"}
--------------------------------------------------------------------------------
/bin/js/app/controller/StartupCommand.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"StartupCommand.js","sourceRoot":"","sources":["../../../../src/app/controller/StartupCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;EAEE;AACF;IAA6B,kCAAgB;IAA7C;;IAWA,CAAC;IATU,+CAAsB,GAA7B;QACI,iBAAM,sBAAsB,WAAE,CAAC;IACnC,CAAC;IAEM,gCAAO,GAAd,UAAe,IAA2B;QACtC,iBAAM,OAAO,YAAC,IAAI,CAAC,CAAC;QACpB,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,CAAC;IACrD,CAAC;IACL,qBAAC;AAAD,CAAC,AAXD,CAA6B,gBAAgB,GAW5C"}
--------------------------------------------------------------------------------
/src/framework/mvc/BaseCommand.ts:
--------------------------------------------------------------------------------
1 |
2 | class BaseSimpleCommand extends puremvc.SimpleCommand {
3 |
4 | constructor() { super() }
5 |
6 | protected data: T;
7 |
8 | public execute(notification: puremvc.INotification): void {
9 | this.data = notification.getBody();
10 | }
11 |
12 | public static register(facade: puremvc.IFacade) {
13 | facade.registerCommand((this).NAME, this);
14 | }
15 |
16 | }
17 |
18 | class BaseMacroCommand extends puremvc.MacroCommand {
19 | constructor() { super() }
20 | }
--------------------------------------------------------------------------------
/bin/js/framework/manager/sound/EffectPlayer.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"EffectPlayer.js","sourceRoot":"","sources":["../../../../../src/framework/manager/sound/EffectPlayer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;AAEH,IAAU,EAAE,CAWX;AAXD,WAAU,EAAE;IACX;QAAkC,gCAAe;QAAjD;;QASA,CAAC;QAPO,gCAAS,GAAhB;YACC,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC;QAClC,CAAC;QAEM,gCAAS,GAAhB,UAAiB,GAAY;YAC5B,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAClC,CAAC;QACF,mBAAC;IAAD,CAAC,AATD,CAAkC,GAAA,eAAe,GAShD;IATY,eAAY,eASxB,CAAA;AACF,CAAC,EAXS,EAAE,KAAF,EAAE,QAWX"}
--------------------------------------------------------------------------------
/bin/js/framework/mvc/BaseCommand.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"BaseCommand.js","sourceRoot":"","sources":["../../../../src/framework/mvc/BaseCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA;IAAyC,qCAAqB;IAE7D;eAAgB,iBAAO;IAAC,CAAC;IAIlB,mCAAO,GAAd,UAAe,YAAmC;QACjD,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC,OAAO,EAAE,CAAC;IACpC,CAAC;IAEa,0BAAQ,GAAtB,UAAuB,MAAuB;QAC7C,MAAM,CAAC,eAAe,CAAO,IAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAChD,CAAC;IAEF,wBAAC;AAAD,CAAC,AAdD,CAAyC,OAAO,CAAC,aAAa,GAc7D;AAED;IAA+B,oCAAoB;IAClD;eAAgB,iBAAO;IAAC,CAAC;IAC1B,uBAAC;AAAD,CAAC,AAFD,CAA+B,OAAO,CAAC,YAAY,GAElD"}
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/patterns/command/SimpleCommand.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"SimpleCommand.js","sourceRoot":"","sources":["../../../../../../../../../src/framework/mvc/org/puremvc/typescript/patterns/command/SimpleCommand.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,oFAAoF;AACpF,wFAAwF;;;;;;;;;;;;;;AAExF,0FAA0F;AAE1F,IAAO,OAAO,CA6Bb;AA7BD,WAAO,OAAO;IAEb,YAAY,CAAC;IAEb;;;;;OAKG;IACH;QACS,iCAAQ;QADjB;;QAkBA,CAAC;QAdA;;;;;;;;;WASG;QACH,+BAAO,GAAP,UAAS,YAA0B;QAGnC,CAAC;QACF,oBAAC;IAAD,CAAC,AAlBD,CACS,QAAA,QAAQ,GAiBhB;IAlBY,qBAAa,gBAkBzB,CAAA;AACF,CAAC,EA7BM,OAAO,KAAP,OAAO,QA6Bb"}
--------------------------------------------------------------------------------
/bin/js/framework/manager/resource/ResourceManager.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"ResourceManager.js","sourceRoot":"","sources":["../../../../../src/framework/manager/resource/ResourceManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,IAAU,EAAE,CAyBX;AAzBD,WAAU,EAAE;IACR;QACI;QAEA,CAAC;QAED;;WAEG;QACI,6BAAG,GAAV,UAAW,OAAe;YACtB,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC;QAED;;WAEG;QACI,8BAAI,GAAX,UAAY,OAAe;YACvB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAClC,CAAC;QACL,sBAAC;IAAD,CAAC,AAlBD,IAkBC;IAED;;OAEG;IACU,MAAG,GAAG,IAAI,eAAe,EAAE,CAAC;AAC7C,CAAC,EAzBS,EAAE,KAAF,EAAE,QAyBX"}
--------------------------------------------------------------------------------
/bin/js/framework/loaders/FileResourceLoader.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"FileResourceLoader.js","sourceRoot":"","sources":["../../../../src/framework/loaders/FileResourceLoader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,IAAO,EAAE,CAaR;AAbD,WAAO,EAAE;IACR;QAAwC,sCAAkB;QAGzD,4BAAY,KAAwB,EAAE,QAA4B;YAAlE,YACC,kBAAM,QAAQ,CAAC,SAEf;YADA,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;;QACpB,CAAC;QAEY,yCAAY,GAAzB;;;oBACC,sBAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAC;;;SAC7B;QACF,yBAAC;IAAD,CAAC,AAXD,CAAwC,GAAA,kBAAkB,GAWzD;IAXY,qBAAkB,qBAW9B,CAAA;AACF,CAAC,EAbM,EAAE,KAAF,EAAE,QAaR"}
--------------------------------------------------------------------------------
/src/app/ApplicationFacade.ts:
--------------------------------------------------------------------------------
1 | class ApplicationFacade extends ApplicationFacadeBase {
2 |
3 | public static get I(): ApplicationFacade {
4 | if (!puremvc.Facade.instance)
5 | puremvc.Facade.instance = new ApplicationFacade();
6 | return puremvc.Facade.instance;
7 | }
8 |
9 | initializeController() {
10 | super.initializeController();
11 | this.registerCommand(ApplicationFacade.STARTUP, StartupCommand);
12 | }
13 |
14 | public startup(stage: DisplayObject) {
15 | super.startup(stage);
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/bin/js/app/ApplicationFacade.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"ApplicationFacade.js","sourceRoot":"","sources":["../../../src/app/ApplicationFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;IAAgC,qCAAqB;IAArD;;IAiBA,CAAC;IAfG,sBAAkB,sBAAC;aAAnB;YACI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ;gBACxB,OAAO,CAAC,MAAM,CAAC,QAAQ,GAAG,IAAI,iBAAiB,EAAE,CAAC;YACtD,OAA0B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC;QACtD,CAAC;;;OAAA;IAED,gDAAoB,GAApB;QACI,iBAAM,oBAAoB,WAAE,CAAC;QAC7B,IAAI,CAAC,eAAe,CAAC,iBAAiB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IACpE,CAAC;IAEM,mCAAO,GAAd,UAAe,KAAoB;QAC/B,iBAAM,OAAO,YAAC,KAAK,CAAC,CAAC;IACzB,CAAC;IAEL,wBAAC;AAAD,CAAC,AAjBD,CAAgC,qBAAqB,GAiBpD"}
--------------------------------------------------------------------------------
/bin/js/app/view/LoadingMediator.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"LoadingMediator.js","sourceRoot":"","sources":["../../../../src/app/view/LoadingMediator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;EAEE;AACF;IAA8B,mCAAY;IAGtC;eACI,kBAAM,eAAe,CAAC,IAAI,EAAE,kBAAkB,CAAC,OAAO,CAAC;IAC3D,CAAC;IAES,gDAAsB,GAAhC;QACI,OAAO,IAAI,CAAC;IAChB,CAAC;IAES,sCAAY,GAAtB;QACI,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,oCAAU,GAAV,UAAW,KAAa;QACpB,OAAO,CAAC,GAAG,CAAC,iBAAe,KAAO,CAAC,CAAC;IACxC,CAAC;IAEK,oCAAU,GAAhB;;;;4BACI,qBAAM,iBAAM,UAAU,WAAE,EAAA;;wBAAxB,SAAwB,CAAC;;;;;KAC5B;IApBa,oBAAI,GAAG,iBAAiB,CAAC;IAqB3C,sBAAC;CAAA,AAtBD,CAA8B,YAAY,GAsBzC"}
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # H5GameFramework-YT 倚天
2 | Laya的PureMVC框架
3 | # 前言
4 | 曹操有宝剑二口:一名“倚天”,一名“青釭”。
5 | # PureMVC
6 | Pure MVC是在基于模型、视图和控制器MVC模式建立的一个轻量级的应用框架,这种开源框架是免费的,它最初是执行的ActionScript 3语言使用的Adobe Flex、Flash和AIR,现在已经移植到几乎所有主要的发展平台,目前支持两个版本框架:标准和多核,总之,标准版提供了一种简单的编码分离的方法,按照MVC设计概念。
7 | # 框架
8 | 框架封装了基本的mvc基类,封装了界面资源的自动加载,使用模板方法,开发者可以很方便的定制自己的资源加载方法。
9 | # 使用
10 | 开箱即用,demo有简单的界面弹窗和切换。
11 | # 指导思想
12 | MVC的思想基本上是逻辑和视图分离,这里的Controller也就是Command可以弱化到只要一个初始化命令,其他的业务逻辑都可以塞入Mediator,Proxy就只管保存数据。
13 |
14 | 而在Mediator和View之间加一个Contract即可实现MVP模式,Mediator对应Presenter。
15 | ========================
16 | # 实例
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/app/view/LoadingMediator.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * name;
3 | */
4 | class LoadingMediator extends BaseMediator implements yt.IProgressListener {
5 | public static NAME = "LoadingMediator";
6 |
7 | constructor() {
8 | super(LoadingMediator.NAME, AppContextMediator.topmost);
9 | }
10 |
11 | protected onCreateResourceLoader(): yt.BaseResourceLoader {
12 | return null;
13 | }
14 |
15 | protected onCreateView() {
16 | return null;
17 | }
18 |
19 | onProgress(value: number) {
20 | console.log(`onProgress: ${value}`);
21 | }
22 |
23 | async onRegister() {
24 | await super.onRegister();
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/bin/js/app/view/TestMediator.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"TestMediator.js","sourceRoot":"","sources":["../../../../src/app/view/TestMediator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;EAEE;AACF;IAA2B,gCAAoB;IAG3C;eACI,kBAAM,YAAY,CAAC,IAAI,EAAE,kBAAkB,CAAC,KAAK,CAAC;IACtD,CAAC;IAES,6CAAsB,GAAhC;QACI,OAAO,IAAI,EAAE,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;IAC7D,CAAC;IAES,mCAAY,GAAtB;QACI,OAAO,IAAI,MAAM,CAAC;IACtB,CAAC;IAEK,iCAAU,GAAhB;;;;4BACI,qBAAM,iBAAM,UAAU,WAAE,EAAA;;wBAAxB,SAAwB,CAAC;wBACzB,IAAI,CAAC,MAAM,EAAE,CAAC;;;;;KACjB;IAEO,6BAAM,GAAd;QACI,IAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC;IAEpC,CAAC;IAtBa,iBAAI,GAAG,cAAc,CAAC;IAuBxC,mBAAC;CAAA,AAxBD,CAA2B,YAAY,GAwBtC"}
--------------------------------------------------------------------------------
/src/app/view/TestMediator.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * name;
3 | */
4 | class TestMediator extends BaseMediator {
5 | public static NAME = "TestMediator";
6 |
7 | constructor() {
8 | super(TestMediator.NAME, AppContextMediator.scene);
9 | }
10 |
11 | protected onCreateResourceLoader(): yt.BaseResourceLoader {
12 | return new yt.FileResourceLoader("res/atlas/comp.atlas");
13 | }
14 |
15 | protected onCreateView() {
16 | return new TestUI;
17 | }
18 |
19 | async onRegister() {
20 | await super.onRegister();
21 | this.initUI();
22 | }
23 |
24 | private initUI() {
25 | const view = this.viewComponent;
26 |
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/bin/js/framework/ApplicationFacadeBase.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"ApplicationFacadeBase.js","sourceRoot":"","sources":["../../../src/framework/ApplicationFacadeBase.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;GAEG;AACH;IAAoC,yCAAc;IAAlD;;IAmBA,CAAC;IAhBG,sBAAkB,0BAAC;aAAnB;YACI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ;gBACxB,OAAO,CAAC,MAAM,CAAC,QAAQ,GAAG,IAAI,qBAAqB,EAAE,CAAC;YAC1D,OAA8B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC;QAC1D,CAAC;;;OAAA;IAED;;OAEG;IACI,uCAAO,GAAd,UAAe,KAAoB;QAC/B,IAAI,CAAC,gBAAgB,CAAC,IAAI,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC;QAErD,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACjD,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAClD,CAAC;IAhBa,6BAAO,GAAW,SAAS,CAAC;IAkB9C,4BAAC;CAAA,AAnBD,CAAoC,OAAO,CAAC,MAAM,GAmBjD"}
--------------------------------------------------------------------------------
/bin/js/framework/manager/sound/MusicPlayer.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"MusicPlayer.js","sourceRoot":"","sources":["../../../../../src/framework/manager/sound/MusicPlayer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;AAEH,IAAU,EAAE,CAiBX;AAjBD,WAAU,EAAE;IACX;QAAiC,+BAAe;QAAhD;YAAA,qEAeC;YAbQ,YAAM,GAAW,SAAS,CAAC;;QAapC,CAAC;QAXO,+BAAS,GAAhB;YACC,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC;QAC/B,CAAC;QAEM,+BAAS,GAAhB,UAAiB,GAAY;YAC5B,GAAG,GAAG,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC;YACzB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC;YAElB,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC;YAC9B,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAClC,CAAC;QACF,kBAAC;IAAD,CAAC,AAfD,CAAiC,GAAA,eAAe,GAe/C;IAfY,cAAW,cAevB,CAAA;AACF,CAAC,EAjBS,EAAE,KAAF,EAAE,QAiBX"}
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/patterns/observer/Notifier.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"Notifier.js","sourceRoot":"","sources":["../../../../../../../../../src/framework/mvc/org/puremvc/typescript/patterns/observer/Notifier.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,kFAAkF;AAElF,sFAAsF;AAEtF,IAAO,OAAO,CA0Db;AA1DD,WAAO,OAAO;IAEb,YAAY,CAAC;IAEb;;;;;;;;;;;;;;;OAeG;IACH;QAUC;;WAEG;QACH;YAVA;;;;eAIG;YACH,WAAM,GAAW,IAAI,CAAC;YAOrB,IAAI,CAAC,MAAM,GAAG,QAAA,MAAM,CAAC,WAAW,EAAE,CAAC;QACpC,CAAC;QAED;;;;;;;;;;;;;;WAcG;QACH,mCAAgB,GAAhB,UAAkB,IAAW,EAAE,IAAa,EAAE,IAAgB;YAA/B,qBAAA,EAAA,WAAa;YAAE,qBAAA,EAAA,WAAgB;YAE7D,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAE,CAAC;QAClD,CAAC;QACF,eAAC;IAAD,CAAC,AArCD,IAqCC;IArCY,gBAAQ,WAqCpB,CAAA;AACF,CAAC,EA1DM,OAAO,KAAP,OAAO,QA0Db"}
--------------------------------------------------------------------------------
/src/framework/ApplicationFacadeBase.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * app门面基类,必须调用startup来注册app上下文媒介
3 | */
4 | class ApplicationFacadeBase extends puremvc.Facade implements puremvc.IFacade {
5 | public static STARTUP: string = "STARTUP";
6 |
7 | public static get I(): ApplicationFacadeBase {
8 | if (!puremvc.Facade.instance)
9 | puremvc.Facade.instance = new ApplicationFacadeBase();
10 | return puremvc.Facade.instance;
11 | }
12 |
13 | /**
14 | * 启动
15 | */
16 | public startup(stage: DisplayObject) {
17 | this.registerMediator(new AppContextMediator(stage));
18 |
19 | this.sendNotification(ApplicationFacade.STARTUP);
20 | this.removeCommand(ApplicationFacade.STARTUP);
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/bin/js/framework/loaders/ViewResourceLoader.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"ViewResourceLoader.js","sourceRoot":"","sources":["../../../../src/framework/loaders/ViewResourceLoader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,IAAO,EAAE,CAiBR;AAjBD,WAAO,EAAE;IACR;QAAwC,sCAAkB;QAGzD,4BAAY,MAAW,EAAE,QAA4B;YAArD,YACC,kBAAM,QAAQ,CAAC,SAEf;YADA,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;;QACtB,CAAC;QAEY,yCAAY,GAAzB;;;;oBACK,KAAK,GAAG,GAAA,aAAa,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;oBACjD,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,EAAE;wBACtB,sBAAO,IAAI,OAAO,CAAC,UAAC,OAAO,IAAK,OAAA,OAAO,CAAC,IAAI,CAAC,EAAb,CAAa,CAAC,EAAC;qBAC/C;oBACD,sBAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAC;;;SACxB;QACF,yBAAC;IAAD,CAAC,AAfD,CAAwC,GAAA,kBAAkB,GAezD;IAfY,qBAAkB,qBAe9B,CAAA;AACF,CAAC,EAjBM,EAAE,KAAF,EAAE,QAiBR"}
--------------------------------------------------------------------------------
/bin/js/framework/loaders/SkinTraversal.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"SkinTraversal.js","sourceRoot":"","sources":["../../../../src/framework/loaders/SkinTraversal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,IAAU,EAAE,CA2BX;AA3BD,WAAU,EAAE;IACR;;MAEE;IACF;QAAA;QAsBA,CAAC;QArBiB,uBAAS,GAAvB,UAAwB,IAAS;YAC7B,IAAI,KAAK,GAAG,EAAE,CAAC;YACf,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YAChC,OAAO,KAAK,CAAC;QACjB,CAAC;QAEc,2BAAa,GAA5B,UAA6B,IAAS,EAAE,KAAe;YACnD,IAAG,CAAC,IAAI,CAAC,KAAK,EAAE;gBACZ,OAAO;aACV;YAED,KAAkB,UAAU,EAAV,KAAA,IAAI,CAAC,KAAK,EAAV,cAAU,EAAV,IAAU,EAAE;gBAAzB,IAAI,KAAK,SAAA;gBACV,IAAI,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE;oBACjC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;iBAChC;gBAED,IAAI,KAAK,CAAC,KAAK,EAAE;oBACb,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;iBACpC;aACJ;QACL,CAAC;QACL,oBAAC;IAAD,CAAC,AAtBD,IAsBC;IAtBY,gBAAa,gBAsBzB,CAAA;AACL,CAAC,EA3BS,EAAE,KAAF,EAAE,QA2BX"}
--------------------------------------------------------------------------------
/src/framework/mvc/org/puremvc/typescript/interfaces/ICommand.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | module puremvc
5 | {
6 | /**
7 | * The interface definition for a PureMVC Command.
8 | */
9 | export interface ICommand
10 | extends INotifier
11 | {
12 | /**
13 | * Fulfill the use-case initiated by the given INotification.
14 | *
15 | * In the Command Pattern, an application use-case typically begins with some user action,
16 | * which results in an INotification being broadcast, which is handled by
17 | * business logic in the execute method of an ICommand.
18 | *
19 | * @param notification
20 | * The INotification to handle.
21 | */
22 | execute( notification:INotification ):void;
23 | }
24 | }
--------------------------------------------------------------------------------
/bin/js/framework/pool/TickerPool.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"TickerPool.js","sourceRoot":"","sources":["../../../../src/framework/pool/TickerPool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;AAEH,IAAU,EAAE,CAgCX;AAhCD,WAAU,EAAE;IAGX;QAAgC,8BAAS;QAExC;YAAA,YACC,iBAAO,SAMP;YALA,KAAI,CAAC,IAAI,GAAG,GAAA,UAAU,CAAC,MAAM,CAAC;gBAC7B,IAAI,EAAE,YAAY;gBAClB,OAAO,EAAE,KAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAI,CAAC;gBACrC,UAAU,EAAE,KAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAI,CAAC;aACtC,CAAC,CAAC;;QACJ,CAAC;QAEO,iCAAY,GAApB;YACC,OAAO,IAAI,WAAW,EAAE,CAAC;QAC1B,CAAC;QAEO,+BAAU,GAAlB,UAAmB,MAAmB,EAAE,OAAsB;YAC7D,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QACtD,CAAC;QAEM,wBAAG,GAAV,UAAW,OAAsB;YAChC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC;QAEM,4BAAO,GAAd,UAAe,MAAmB;YACjC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC3B,CAAC;QAEF,iBAAC;IAAD,CAAC,AA3BD,CAAgC,SAAS,GA2BxC;IA3BY,aAAU,aA2BtB,CAAA;AAEF,CAAC,EAhCS,EAAE,KAAF,EAAE,QAgCX"}
--------------------------------------------------------------------------------
/bin/js/framework/AppContextMediator.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"AppContextMediator.js","sourceRoot":"","sources":["../../../src/framework/AppContextMediator.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;EAEE;AACF;IAAiC,sCAAgB;IAS7C,4BAAY,KAAoB;eAC5B,kBAAM,kBAAkB,CAAC,IAAI,EAAE,KAAK,CAAC;IACzC,CAAC;IAED,uCAAU,GAAV;QACI,IAAI,CAAC,GAAkB,IAAI,CAAC,aAAa,CAAC;QAC1C,kBAAkB,CAAC,KAAK,GAAG,CAAC,CAAC;QAC7B,kBAAkB,CAAC,KAAK,GAAkB,CAAC,CAAC,QAAQ,CAAC,IAAI,aAAa,EAAE,CAAC,CAAC;QAC1E,kBAAkB,CAAC,MAAM,GAAkB,CAAC,CAAC,QAAQ,CAAC,IAAI,aAAa,EAAE,CAAC,CAAC;QAC3E,kBAAkB,CAAC,KAAK,GAAkB,CAAC,CAAC,QAAQ,CAAC,IAAI,aAAa,EAAE,CAAC,CAAC;QAC1E,kBAAkB,CAAC,OAAO,GAAkB,CAAC,CAAC,QAAQ,CAAC,IAAI,aAAa,EAAE,CAAC,CAAC;QAE5E,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAEhD,CAAC;IAED,qCAAQ,GAAR;QACI,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,CAAC;IACpC,CAAC;IAED,oCAAO,GAAP;QACI,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;IACxB,CAAC;IA9Ba,uBAAI,GAAG,oBAAoB,CAAC;IA+B9C,yBAAC;CAAA,AAhCD,CAAiC,OAAO,CAAC,QAAQ,GAgChD"}
--------------------------------------------------------------------------------
/bin/js/app/model/GameProxy.js:
--------------------------------------------------------------------------------
1 | var __extends = (this && this.__extends) || (function () {
2 | var extendStatics = function (d, b) {
3 | extendStatics = Object.setPrototypeOf ||
4 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6 | return extendStatics(d, b);
7 | };
8 | return function (d, b) {
9 | extendStatics(d, b);
10 | function __() { this.constructor = d; }
11 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12 | };
13 | })();
14 | var GameProxy = /** @class */ (function (_super) {
15 | __extends(GameProxy, _super);
16 | function GameProxy() {
17 | return _super.call(this, GameProxy.NAME) || this;
18 | }
19 | GameProxy.NAME = "GameProxy";
20 | return GameProxy;
21 | }(BaseProxy));
22 | //# sourceMappingURL=GameProxy.js.map
--------------------------------------------------------------------------------
/bin/js/framework/loaders/BaseResourceLoader.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"BaseResourceLoader.js","sourceRoot":"","sources":["../../../../src/framework/loaders/BaseResourceLoader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,IAAO,EAAE,CA6BR;AA7BD,WAAO,EAAE;IACR;QAGC,4BAAY,QAA4B;YAF9B,uBAAkB,GAAsB,SAAS,CAAC;YAG3D,IAAI,QAAQ,EAAE;gBACb,IAAI,CAAC,kBAAkB,GAAG,QAAQ,CAAC;aACnC;QACF,CAAC;QAEM,kDAAqB,GAA5B,UAA6B,QAA2B;YACvD,IAAI,CAAC,kBAAkB,GAAG,QAAQ,CAAC;QACpC,CAAC;QAEe,iCAAI,GAApB,UAAqB,KAAwB;;;;oBAC5C,sBAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;4BAClC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EACrB,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,UAAC,GAAQ;gCAC7B,OAAO,CAAC,GAAG,CAAC,CAAC;4BACd,CAAC,CAAC,EACF,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,UAAC,CAAC;gCACtB,KAAI,CAAC,kBAAkB,IAAI,KAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;4BAClE,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CACf,CAAC;wBACH,CAAC,CAAC,EAAC;;;SACH;QAGF,yBAAC;IAAD,CAAC,AA3BD,IA2BC;IA3BqB,qBAAkB,qBA2BvC,CAAA;AACF,CAAC,EA7BM,EAAE,KAAF,EAAE,QA6BR"}
--------------------------------------------------------------------------------
/bin/res/atlas/.rec:
--------------------------------------------------------------------------------
1 | D .
2 | D comp
3 | P D12221A9 bg.png
4 | P 9401CC40 blank.png
5 | P B03390E5 btn_close.png
6 | P 1F3929EA button.png
7 | P 6CC6DF97 checkbox.png
8 | P FB94CCF2 clip_num.png
9 | P F7B6B7D7 clip_selectBox.png
10 | P 755271AE clip_tree_arrow.png
11 | P 859FD34C clip_tree_folder.png
12 | P A0E3B8F9 combobox.png
13 | P 9EDA959E hscroll$bar.png
14 | P 1AB768D4 hscroll$down.png
15 | P 685261D3 hscroll$up.png
16 | P 274B8076 hscroll.png
17 | P E466EB1C hslider$bar.png
18 | P C4BECA54 hslider.png
19 | P 5EDC128C html.png
20 | P ACFFCCCF image.png
21 | P 5EDC128C label.png
22 | P 5EDC128C linkbutton.png
23 | P 9E4DD730 progress$bar.png
24 | P 3FD78E12 progress.png
25 | P BF898D6A radio.png
26 | P BF898D6A radiogroup.png
27 | P 8CFD9D35 tab.png
28 | P BDA71F88 textarea.png
29 | P BDA71F88 textinput.png
30 | P 52107B89 vscroll$bar.png
31 | P E26B933E vscroll$down.png
32 | P B9680947 vscroll$up.png
33 | P 7E990267 vscroll.png
34 | P E466EB1C vslider$bar.png
35 | P 2BFF7046 vslider.png
36 |
--------------------------------------------------------------------------------
/bin/js/framework/pool/HttpClientPool.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"HttpClientPool.js","sourceRoot":"","sources":["../../../../src/framework/pool/HttpClientPool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;AAEH,IAAU,EAAE,CA2CX;AA3CD,WAAU,EAAE;IAUX;;OAEG;IACH;QAAoC,kCAAS;QAE5C;YAAA,YACC,iBAAO,SAOP;YANA,KAAI,CAAC,IAAI,GAAG,GAAA,UAAU,CAAC,MAAM,CAAC;gBAC7B,IAAI,EAAE,gBAAgB;gBACtB,qBAAqB,EAAE,CAAC;gBACxB,OAAO,EAAE,KAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAI,CAAC;gBACzC,UAAU,EAAE,KAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAI,CAAC;aAC1C,CAAC,CAAC;;QACJ,CAAC;QAEO,yCAAgB,GAAxB;YACC,OAAO,IAAI,GAAA,UAAU,EAAE,CAAC;QACzB,CAAC;QAEO,uCAAc,GAAtB,UAAuB,MAAkB,EAAE,OAAoB;YAC9D,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC5B,CAAC;QAEa,kBAAG,GAAjB,UAAkB,OAAoB;YACrC,OAAO,cAAc,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACvD,CAAC;QAEa,sBAAO,GAArB,UAAsB,MAAkB;YACvC,cAAc,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACnD,CAAC;QAEF,qBAAC;IAAD,CAAC,AA5BD,CAAoC,SAAS,GA4B5C;IA5BY,iBAAc,iBA4B1B,CAAA;AAEF,CAAC,EA3CS,EAAE,KAAF,EAAE,QA2CX"}
--------------------------------------------------------------------------------
/bin/js/framework/abc/DisplayObject.js:
--------------------------------------------------------------------------------
1 | var __extends = (this && this.__extends) || (function () {
2 | var extendStatics = function (d, b) {
3 | extendStatics = Object.setPrototypeOf ||
4 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6 | return extendStatics(d, b);
7 | };
8 | return function (d, b) {
9 | extendStatics(d, b);
10 | function __() { this.constructor = d; }
11 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12 | };
13 | })();
14 | /** 游戏显示对象
15 | * 不同游戏引擎可以定义为不同类型,如Laya.Sprite, egret.DisplayObject
16 | */
17 | var DisplayObject = /** @class */ (function (_super) {
18 | __extends(DisplayObject, _super);
19 | function DisplayObject() {
20 | return _super !== null && _super.apply(this, arguments) || this;
21 | }
22 | return DisplayObject;
23 | }(Laya.Sprite));
24 | ;
25 | //# sourceMappingURL=DisplayObject.js.map
--------------------------------------------------------------------------------
/bin/js/framework/loaders/GroupResourceLoader.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"GroupResourceLoader.js","sourceRoot":"","sources":["../../../../src/framework/loaders/GroupResourceLoader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,IAAO,EAAE,CAkCR;AAlCD,WAAO,EAAE;IACR;QAAyC,uCAAkB;QAS1D,6BAAY,OAA6B,EAAE,QAA4B;YAAvE,YACC,kBAAM,QAAQ,CAAC,SAOf;YANA,KAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACvB,KAAI,CAAC,KAAK,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;YAEhC,KAAmB,UAAO,EAAP,mBAAO,EAAP,qBAAO,EAAP,IAAO,EAAE;gBAAvB,IAAI,MAAM,gBAAA;gBACd,MAAM,CAAC,qBAAqB,CAAC,KAAI,CAAC,CAAC;aACnC;;QACF,CAAC;QAEY,0CAAY,GAAzB;;;;;;4BACC,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC;4BACvB,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC;kCACO,EAAZ,KAAA,IAAI,CAAC,OAAO;;;iCAAZ,CAAA,cAAY,CAAA;4BAAtB,MAAM;4BACd,qBAAM,MAAM,CAAC,YAAY,EAAE,EAAA;;4BAA3B,SAA2B,CAAC;4BAC5B,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,KAAK,CAAC;4BACjC,IAAI,CAAC,cAAc,EAAE,CAAC;;;4BAHJ,IAAY,CAAA;;;;;;SAK/B;QAED,wCAAU,GAAV,UAAW,KAAa;YACvB,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,IAAI,CAAC,aAAa,GAAG,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;QAC7E,CAAC;QACF,0BAAC;IAAD,CAAC,AAhCD,CAAyC,GAAA,kBAAkB,GAgC1D;IAhCY,sBAAmB,sBAgC/B,CAAA;AACF,CAAC,EAlCM,EAAE,KAAF,EAAE,QAkCR"}
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/patterns/proxy/Proxy.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"Proxy.js","sourceRoot":"","sources":["../../../../../../../../../src/framework/mvc/org/puremvc/typescript/patterns/proxy/Proxy.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,oFAAoF;;;;;;;;;;;;;;AAEpF,0FAA0F;AAE1F,IAAO,OAAO,CAsHb;AAtHD,WAAO,OAAO;IAEb,YAAY,CAAC;IAEb;;;;;;;;;;;;;;;;;OAiBG;IACH;QACS,yBAAQ;QAiBhB;;;;;;;;WAQG;QACH,eAAa,SAAqB,EAAE,IAAa;YAApC,0BAAA,EAAA,gBAAqB;YAAE,qBAAA,EAAA,WAAa;YAAjD,YAEC,iBAAO,SAMP;YA/BD;;;;eAIG;YACH,eAAS,GAAU,IAAI,CAAC;YAExB;;;;eAIG;YACH,UAAI,GAAO,IAAI,CAAC;YAef,KAAI,CAAC,SAAS,GAAG,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;YAE9D,IAAI,IAAI,IAAI,IAAI;gBACf,KAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;;QACrB,CAAC;QAED;;;;;WAKG;QACH,4BAAY,GAAZ;YAEC,OAAO,IAAI,CAAC,SAAS,CAAC;QACvB,CAAC;QAED;;;;;WAKG;QACH,uBAAO,GAAP,UAAS,IAAQ;YAEhB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QAClB,CAAC;QAED;;;;;WAKG;QACH,uBAAO,GAAP;YAEC,OAAO,IAAI,CAAC,IAAI,CAAC;QAClB,CAAC;QAED;;;WAGG;QACH,0BAAU,GAAV;QAGA,CAAC;QAED;;;WAGG;QACH,wBAAQ,GAAR;QAGA,CAAC;QAED;;;;;WAKG;QACK,UAAI,GAAU,OAAO,CAAC;QAC/B,YAAC;KAAA,AA/FD,CACS,QAAA,QAAQ,GA8FhB;IA/FY,aAAK,QA+FjB,CAAA;AACF,CAAC,EAtHM,OAAO,KAAP,OAAO,QAsHb"}
--------------------------------------------------------------------------------
/laya/.laya:
--------------------------------------------------------------------------------
1 |
2 | img,temp,sound
3 | embed
4 | png,jpg
5 | bin/res/atlas
6 | bin
7 | src/ui
8 |
9 |
11 | 0
12 | bin/ui.json
13 | Box,List,Tab,RadioGroup,ViewStack,Panel,HBox,VBox,Tree,Sprite
14 | View,Dialog
15 |
16 | 1
17 |
18 | 80
19 |
20 |
21 |
23 | 2048
24 | 2048
25 | 512
26 | 512
27 | false
28 | false
29 |
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/patterns/observer/Observer.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"Observer.js","sourceRoot":"","sources":["../../../../../../../../../src/framework/mvc/org/puremvc/typescript/patterns/observer/Observer.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,oFAAoF;AAEpF,IAAO,OAAO,CAkIb;AAlID,WAAO,OAAO;IAEb,YAAY,CAAC;IAEb;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH;QAeC;;;;;;;;WAQG;QACH,kBAAa,YAAqB,EAAE,aAAiB;YArBrD;;;eAGG;YACH,WAAM,GAAY,IAAI,CAAC;YAEvB;;;eAGG;YACH,YAAO,GAAO,IAAI,CAAC;YAalB,IAAI,CAAC,eAAe,CAAE,YAAY,CAAE,CAAC;YACrC,IAAI,CAAC,gBAAgB,CAAE,aAAa,CAAE,CAAC;QACxC,CAAC;QAED;;;;;WAKG;QACK,kCAAe,GAAvB;YAEC,OAAO,IAAI,CAAC,MAAM,CAAC;QACpB,CAAC;QAED;;;;;;;WAOG;QACH,kCAAe,GAAf,UAAiB,YAAqB;YAErC,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC;QAC5B,CAAC;QAED;;;;;WAKG;QACK,mCAAgB,GAAxB;YAEC,OAAO,IAAI,CAAC,OAAO,CAAC;QACrB,CAAC;QAED;;;;;WAKG;QACH,mCAAgB,GAAhB,UAAkB,aAAiB;YAElC,IAAI,CAAC,OAAO,GAAG,aAAa,CAAC;QAC9B,CAAC;QAED;;;;;;WAMG;QACH,iCAAc,GAAd,UAAgB,YAA0B;YAEzC,IAAI,CAAC,eAAe,EAAE,CAAC,IAAI,CAAE,IAAI,CAAC,gBAAgB,EAAE,EAAE,YAAY,CAAE,CAAC;QACtE,CAAC;QAED;;;;;;;;WAQG;QACF,uCAAoB,GAApB,UAAsB,MAAU;YAE/B,OAAO,MAAM,KAAK,IAAI,CAAC,OAAO,CAAC;QAChC,CAAC;QACH,eAAC;IAAD,CAAC,AArGD,IAqGC;IArGY,gBAAQ,WAqGpB,CAAA;AACF,CAAC,EAlIM,OAAO,KAAP,OAAO,QAkIb"}
--------------------------------------------------------------------------------
/src/framework/AppContextMediator.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * app上下文媒介,这里注册了界面的层级管理和时钟调用;
3 | */
4 | class AppContextMediator extends puremvc.Mediator {
5 | public static NAME = "AppContextMediator";
6 |
7 | public static stage: any;
8 | public static scene: DisplayObject;
9 | public static dialog: DisplayObject;
10 | public static float: DisplayObject;
11 | public static topmost: DisplayObject;
12 |
13 | constructor(stage: DisplayObject) {
14 | super(AppContextMediator.NAME, stage);
15 | }
16 |
17 | onRegister() {
18 | let p = this.viewComponent;
19 | AppContextMediator.stage = p;
20 | AppContextMediator.scene = p.addChild(new DisplayObject());
21 | AppContextMediator.dialog = p.addChild(new DisplayObject());
22 | AppContextMediator.float = p.addChild(new DisplayObject());
23 | AppContextMediator.topmost = p.addChild(new DisplayObject());
24 |
25 | Laya.timer.frameLoop(1, this, this.onFrame);
26 |
27 | }
28 |
29 | onRemove() {
30 | this.viewComponent.removeSelf();
31 | }
32 |
33 | onFrame() {
34 | yt.Ticker.onFrame();
35 | }
36 | }
--------------------------------------------------------------------------------
/.laya/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.2.0",
3 | "configurations": [
4 | {
5 | "name": "layaAir",
6 | "type": "chrome",
7 | "request": "launch",
8 | "file": "${workspaceRoot}/bin/index.html",
9 | "runtimeExecutable": "${execPath}",
10 | "useBuildInServer": true,
11 | "sourceMaps": true,
12 | "webRoot": "${workspaceRoot}",
13 | "port": 9222,
14 | "fixedPort":false
15 | },
16 | {
17 | "name": "chrome调试",
18 | "type": "chrome",
19 | "request": "launch",
20 | "file": "${workspaceRoot}/bin/index.html",
21 | // "换成自己的谷歌安装路径,": 比如
22 | //window 默认安装路径为: "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"
23 | //mac 系统上的默认安装路径为 "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome";
24 | // "runtimeExecutable": "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe",
25 | "runtimeArgs": [
26 | "--allow-file-access-from-files",
27 | "--allow-file-access-frome-files",
28 | " --disable-web-security"
29 | ],
30 | "sourceMaps": true,
31 | "webRoot": "${workspaceRoot}",
32 | //假如谷歌调试报userDataDir不可用,请把谷歌安装路径取得管理员权限,或者更换${tmpdir}为其他可以读写的文件夹,也可以删除。
33 | "userDataDir": "${workspaceRoot}/.laya/chrome",
34 | "fixedPort":false
35 | }
36 | ]
37 | }
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/patterns/command/MacroCommand.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"MacroCommand.js","sourceRoot":"","sources":["../../../../../../../../../src/framework/mvc/org/puremvc/typescript/patterns/command/MacroCommand.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,oFAAoF;AACpF,wFAAwF;AACxF,0FAA0F;;;;;;;;;;;;;;AAE1F,IAAO,OAAO,CAkHb;AAlHD,WAAO,OAAO;IAEb,YAAY,CAAC;IAEb;;;;;;;;;;;;;;OAcG;IACH;QACS,gCAAQ;QAUhB;;;;;;;WAOG;QACH;YAAA,YAEC,iBAAO,SAIP;YArBD;;;;eAIG;YACH,iBAAW,GAAc,IAAI,CAAC;YAc7B,KAAI,CAAC,WAAW,GAAG,IAAI,KAAK,EAAY,CAAC;YACzC,KAAI,CAAC,sBAAsB,EAAE,CAAC;;QAC/B,CAAC;QAED;;;;;;;;;;;;;;;;;;WAkBG;QACH,6CAAsB,GAAtB;QAGA,CAAC;QAED;;;;;;;WAOG;QACH,oCAAa,GAAb,UAAe,eAAwB;YAEtC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACxC,CAAC;QAED;;;;;;;;;;;WAWG;QACH,8BAAO,GAAP,UAAS,YAA0B;YAElC,IAAI,WAAW,GAAc,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACvD,IAAI,GAAG,GAAU,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;YACzC,KAAK,IAAI,CAAC,GAAQ,CAAC,EAAE,CAAC,GAAC,GAAG,EAAE,CAAC,EAAE,EAC/B;gBACC;;;;mBAIG;gBACH,IAAI,eAAe,GAAO,WAAW,CAAC,CAAC,CAAC,CAAC;gBACzC,IAAI,eAAe,GAA+B,IAAI,eAAe,EAAE,CAAC;gBACxE,eAAe,CAAC,OAAO,CAAE,YAAY,CAAE,CAAC;aACxC;YAED,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC5B,CAAC;QACF,mBAAC;IAAD,CAAC,AA9FD,CACS,QAAA,QAAQ,GA6FhB;IA9FY,oBAAY,eA8FxB,CAAA;AACF,CAAC,EAlHM,OAAO,KAAP,OAAO,QAkHb"}
--------------------------------------------------------------------------------
/bin/js/framework/manager/ticker/SimpleSignal.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"SimpleSignal.js","sourceRoot":"","sources":["../../../../../src/framework/manager/ticker/SimpleSignal.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;IAMC,mHAAmH;IACnH,mHAAmH;IAEnH;QACC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IACrB,CAAC;IAGD,mHAAmH;IACnH,mHAAmH;IAE5G,0BAAG,GAAV,UAAW,IAAO;QACjB,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE;YACxC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC1B,OAAO,IAAI,CAAC;SACZ;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IAEM,6BAAM,GAAb,UAAc,IAAO;QACpB,IAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,GAAG,GAAG,CAAC,CAAC,EAAE;YACb,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YAC9B,OAAO,IAAI,CAAC;SACZ;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IAEM,gCAAS,GAAhB;QACC,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE;YAC9B,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;YAC1B,OAAO,IAAI,CAAC;SACZ;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IAEM,+BAAQ,GAAf;QAAgB,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,yBAAc;;QAC7B,IAAM,kBAAkB,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;QACnD,kBAAkB,CAAC,OAAO,CAAC,UAAC,IAAI;YAC/B,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC;IACJ,CAAC;IAMD,sBAAW,kCAAQ;QAHnB,mHAAmH;QACnH,mHAAmH;aAEnH;YACC,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;QAC9B,CAAC;;;OAAA;IACF,mBAAC;AAAD,CAAC,AAxDD,IAwDC"}
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/patterns/mediator/Mediator.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"Mediator.js","sourceRoot":"","sources":["../../../../../../../../../src/framework/mvc/org/puremvc/typescript/patterns/mediator/Mediator.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,oFAAoF;AACpF,wFAAwF;AACxF,0FAA0F;;;;;;;;;;;;;;AAE1F,IAAO,OAAO,CA4Ib;AA5ID,WAAO,OAAO;IAEb,YAAY,CAAC;IAEb;;;;;OAKG;IACH;QACS,4BAAQ;QAiBhB;;;;;;;;WAQG;QACH,kBAAa,YAAwB,EAAE,aAAsB;YAAhD,6BAAA,EAAA,mBAAwB;YAAE,8BAAA,EAAA,oBAAsB;YAA7D,YAEC,iBAAO,SAIP;YA7BD;;;;eAIG;YACH,kBAAY,GAAU,IAAI,CAAC;YAE3B;;;;eAIG;YACH,mBAAa,GAAO,IAAI,CAAC;YAexB,KAAI,CAAC,YAAY,GAAG,CAAC,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;YAC1E,KAAI,CAAC,aAAa,GAAG,aAAa,CAAC;;QACpC,CAAC;QAED;;;;;WAKG;QACH,kCAAe,GAAf;YAEC,OAAO,IAAI,CAAC,YAAY,CAAC;QAC1B,CAAC;QAED;;;;;;;;;;;;;;;WAeG;QACH,mCAAgB,GAAhB;YAEC,OAAO,IAAI,CAAC,aAAa,CAAC;QAC3B,CAAC;QAED;;;;;WAKG;QACH,mCAAgB,GAAhB,UAAkB,aAAiB;YAElC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACpC,CAAC;QAED;;;;;;WAMG;QACH,4CAAyB,GAAzB;YAEC,OAAO,IAAI,KAAK,EAAU,CAAC;QAC5B,CAAC;QAED;;;;;;;;;WASG;QACH,qCAAkB,GAAlB,UAAoB,YAA0B;QAG9C,CAAC;QAED;;;WAGG;QACH,6BAAU,GAAV;QAGA,CAAC;QAED;;;WAGG;QACH,2BAAQ,GAAR;QAGA,CAAC;QAED;;;;WAIG;QACI,aAAI,GAAU,UAAU,CAAC;QACjC,eAAC;KAAA,AAjID,CACS,QAAA,QAAQ,GAgIhB;IAjIY,gBAAQ,WAiIpB,CAAA;AACF,CAAC,EA5IM,OAAO,KAAP,OAAO,QA4Ib"}
--------------------------------------------------------------------------------
/bin/js/framework/manager/sound/SoundManager.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"SoundManager.js","sourceRoot":"","sources":["../../../../../src/framework/manager/sound/SoundManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;AAEH,IAAU,EAAE,CA2DX;AA3DD,WAAU,EAAE;IACR;QAA2B,gCAAS;QAApC;YAAA,qEAuDC;YAtDG,YAAY;YACJ,iBAAW,GAAoB,IAAI,GAAA,WAAW,CAAC;YAC/C,kBAAY,GAAoB,IAAI,GAAA,YAAY,CAAC;YAIzD,WAAW;YACH,eAAS,GAAY,KAAK,CAAC;YAC3B,eAAS,GAAY,KAAK,CAAC;;QA8CvC,CAAC;QA5CU,mCAAY,GAAnB,UAAoB,IAAa;YAC7B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YAEtB,IAAI,IAAI,EAAE;gBACN,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC;aACjC;QACL,CAAC;QAEM,mCAAY,GAAnB,UAAoB,IAAa;YAC7B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YAEtB,IAAI,IAAI,EAAE;gBACN,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC;aAChC;iBAAM;gBACH,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aAC3C;QACL,CAAC;QAEM,kCAAW,GAAlB;YACI,OAAO,IAAI,CAAC,SAAS,CAAC;QAC1B,CAAC;QAEM,kCAAW,GAAlB;YACI,OAAO,IAAI,CAAC,SAAS,CAAC;QAC1B,CAAC;QAED,gCAAS,GAAT,UAAU,GAAW;YACjB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC;YAElB,IAAI,IAAI,CAAC,SAAS,EAAE;gBAChB,OAAO;aACV;YAED,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QACpC,CAAC;QAED,gCAAS,GAAT,UAAU,GAAW;YACjB,IAAI,IAAI,CAAC,SAAS,EAAE;gBAChB,OAAO;aACV;YAED,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QACrC,CAAC;QAEL,mBAAC;IAAD,CAAC,AAvDD,CAA2B,SAAS,GAuDnC;IAEY,QAAK,GAAG,IAAI,YAAY,CAAC;AAC1C,CAAC,EA3DS,EAAE,KAAF,EAAE,QA2DX"}
--------------------------------------------------------------------------------
/bin/js/framework/presence/IPresence.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sat Aug 03 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 | //# sourceMappingURL=IPresence.js.map
--------------------------------------------------------------------------------
/bin/js/framework/mvc/BaseProxy.js:
--------------------------------------------------------------------------------
1 | var __extends = (this && this.__extends) || (function () {
2 | var extendStatics = function (d, b) {
3 | extendStatics = Object.setPrototypeOf ||
4 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6 | return extendStatics(d, b);
7 | };
8 | return function (d, b) {
9 | extendStatics(d, b);
10 | function __() { this.constructor = d; }
11 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12 | };
13 | })();
14 | /*
15 | * name;
16 | */
17 | var BaseProxy = /** @class */ (function (_super) {
18 | __extends(BaseProxy, _super);
19 | function BaseProxy() {
20 | return _super !== null && _super.apply(this, arguments) || this;
21 | }
22 | return BaseProxy;
23 | }(puremvc.Proxy));
24 | /**
25 | * 获取Proxy的装饰器
26 | * @param proxy
27 | */
28 | function Proxy(proxy) {
29 | return function (target, propertyName) {
30 | Object.defineProperty(target, propertyName, {
31 | get: function () {
32 | return ApplicationFacade.I.retrieveProxy(proxy.NAME);
33 | }
34 | });
35 | };
36 | }
37 | //# sourceMappingURL=BaseProxy.js.map
--------------------------------------------------------------------------------
/bin/js/framework/loaders/IProgressListener.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Tue Aug 06 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 | //# sourceMappingURL=IProgressListener.js.map
--------------------------------------------------------------------------------
/src/framework/mvc/org/puremvc/typescript/patterns/command/SimpleCommand.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 |
5 | ///
6 |
7 | module puremvc
8 | {
9 | "use strict";
10 |
11 | /**
12 | * A base ICommand implementation.
13 | *
14 | * Your subclass should override the execute method where your business logic will
15 | * handle the INotification.
16 | */
17 | export class SimpleCommand
18 | extends Notifier
19 | implements ICommand, INotifier
20 | {
21 | /**
22 | * Fulfill the use-case initiated by the given INotification.
23 | *
24 | * In the Command Pattern, an application use-case typically begins with some user action,
25 | * which results in an INotification being broadcast, which is handled by
26 | * business logic in the execute method of an ICommand.
27 | *
28 | * @param notification
29 | * The INotification to handle.
30 | */
31 | execute( notification:INotification ):void
32 | {
33 |
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/bin/js/framework/presence/LocalPresence.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"LocalPresence.js","sourceRoot":"","sources":["../../../../src/framework/presence/LocalPresence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,IAAU,EAAE,CAiDX;AAjDD,WAAU,EAAE;IAER;QAII;YAFQ,SAAI,GAAG,EAAE,CAAC;QAGlB,CAAC;QAED,+BAAG,GAAH,UAAI,GAAW,EAAE,KAAsB;YACnC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YACvB,IAAI;gBACA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;oBAC3B,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;iBACzC;qBAAM;oBACH,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;iBACzC;aACJ;YAAC,OAAO,KAAK,EAAE;gBACZ,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;aACxB;QACL,CAAC;QAED,+BAAG,GAAH,UAAgB,GAAW;YACvB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;gBACjB,IAAI,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;gBACzC,IAAI;oBACA,IAAI,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBAC1B,IAAI,GAAG,IAAI,OAAO,GAAG,IAAI,QAAQ,EAAE;wBAC/B,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;qBACxB;yBAAM;wBACH,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;qBACxB;iBACJ;gBAAC,OAAO,KAAK,EAAE;oBACZ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;iBACxB;aACJ;YAED,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;QAED,+BAAG,GAAH,UAAI,GAAG;YACH,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACtB,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACtC,CAAC;QAEL,wBAAC;IAAD,CAAC,AA3CD,IA2CC;IAEY,gBAAa,GAAc,IAAI,iBAAiB,EAAE,CAAC;AAEpE,CAAC,EAjDS,EAAE,KAAF,EAAE,QAiDX"}
--------------------------------------------------------------------------------
/bin/js/app/controller/StartupCommand.js:
--------------------------------------------------------------------------------
1 | var __extends = (this && this.__extends) || (function () {
2 | var extendStatics = function (d, b) {
3 | extendStatics = Object.setPrototypeOf ||
4 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6 | return extendStatics(d, b);
7 | };
8 | return function (d, b) {
9 | extendStatics(d, b);
10 | function __() { this.constructor = d; }
11 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12 | };
13 | })();
14 | /*
15 | * name;
16 | */
17 | var StartupCommand = /** @class */ (function (_super) {
18 | __extends(StartupCommand, _super);
19 | function StartupCommand() {
20 | return _super !== null && _super.apply(this, arguments) || this;
21 | }
22 | StartupCommand.prototype.initializeMacroCommand = function () {
23 | _super.prototype.initializeMacroCommand.call(this);
24 | };
25 | StartupCommand.prototype.execute = function (note) {
26 | _super.prototype.execute.call(this, note);
27 | this.facade.registerProxy(new GameProxy());
28 | this.facade.registerMediator(TestMediator.get());
29 | };
30 | return StartupCommand;
31 | }(BaseMacroCommand));
32 | //# sourceMappingURL=StartupCommand.js.map
--------------------------------------------------------------------------------
/src/framework/loaders/IProgressListener.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Tue Aug 06 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 |
23 | module yt {
24 | export interface IProgressListener {
25 | onProgress(value: number);
26 | }
27 | }
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/core/Model.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"Model.js","sourceRoot":"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CAAE,IAAI,IAAI,CAAC;QAC3C,CAAC;QAkBD;;;;;WAKG;QACI,iBAAW,GAAlB;YAEC,IAAI,CAAC,KAAK,CAAC,QAAQ;gBAClB,KAAK,CAAC,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;YAE9B,OAAO,KAAK,CAAC,QAAQ,CAAC;QACvB,CAAC;QA5BD;;;;;;WAMG;QACK,mBAAa,GAAU,sCAAsC,CAAC;QAsBvE,YAAC;KAAA,AAtID,IAsIC;IAtIY,aAAK,QAsIjB,CAAA;AACF,CAAC,EA5JM,OAAO,KAAP,OAAO,QA4Jb"}
--------------------------------------------------------------------------------
/bin/js/framework/mvc/BaseCommand.js:
--------------------------------------------------------------------------------
1 | var __extends = (this && this.__extends) || (function () {
2 | var extendStatics = function (d, b) {
3 | extendStatics = Object.setPrototypeOf ||
4 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6 | return extendStatics(d, b);
7 | };
8 | return function (d, b) {
9 | extendStatics(d, b);
10 | function __() { this.constructor = d; }
11 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12 | };
13 | })();
14 | var BaseSimpleCommand = /** @class */ (function (_super) {
15 | __extends(BaseSimpleCommand, _super);
16 | function BaseSimpleCommand() {
17 | return _super.call(this) || this;
18 | }
19 | BaseSimpleCommand.prototype.execute = function (notification) {
20 | this.data = notification.getBody();
21 | };
22 | BaseSimpleCommand.register = function (facade) {
23 | facade.registerCommand(this.NAME, this);
24 | };
25 | return BaseSimpleCommand;
26 | }(puremvc.SimpleCommand));
27 | var BaseMacroCommand = /** @class */ (function (_super) {
28 | __extends(BaseMacroCommand, _super);
29 | function BaseMacroCommand() {
30 | return _super.call(this) || this;
31 | }
32 | return BaseMacroCommand;
33 | }(puremvc.MacroCommand));
34 | //# sourceMappingURL=BaseCommand.js.map
--------------------------------------------------------------------------------
/src/framework/presence/IPresence.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sat Aug 03 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 |
23 | namespace yt {
24 | export interface IPresence {
25 | set(key: string, value: string | Object): any;
26 | get(key: string): T;
27 | del(key: string): void;
28 | }
29 |
30 | }
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/patterns/observer/Notification.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"Notification.js","sourceRoot":"","sources":["../../../../../../../../../src/framework/mvc/org/puremvc/typescript/patterns/observer/Notification.ts"],"names":[],"mappings":"AAAA,wFAAwF;AAExF,IAAO,OAAO,CA4Ib;AA5ID,WAAO,OAAO;IAEb,YAAY,CAAC;IAEb;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH;QAwBC;;;;;;;;;;;WAWG;QACH,sBAAa,IA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,OAAO,EAAE,CAAC,CAAC;YAC1E,OAAO,GAAG,CAAC;QACZ,CAAC;QACF,mBAAC;IAAD,CAAC,AA/GD,IA+GC;IA/GY,oBAAY,eA+GxB,CAAA;AACF,CAAC,EA5IM,OAAO,KAAP,OAAO,QA4Ib"}
--------------------------------------------------------------------------------
/src/framework/abc/Singleton.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Tue Aug 06 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 | class Singleton {
23 | static getInstance(this: new () => T): T {
24 | if (!(this).instance) {
25 | (this).instance = new this();
26 | }
27 | return (this).instance;
28 | }
29 | }
--------------------------------------------------------------------------------
/src/framework/manager/sound/EffectPlayer.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sat Aug 03 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 |
23 | namespace yt {
24 | export class EffectPlayer extends BaseSoundPlayer {
25 |
26 | public stopSound() {
27 | Laya.SoundManager.stopAllSound();
28 | }
29 |
30 | public playSound(url?: string) {
31 | Laya.SoundManager.playSound(url);
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/src/framework/mvc/org/puremvc/typescript/interfaces/INotifier.ts:
--------------------------------------------------------------------------------
1 | module puremvc
2 | {
3 | /**
4 | * The interface definition for a PureMVC Notifier.
5 | *
6 | * MacroCommand, SimpleCommand, Mediator and
7 | * Proxy all have a need to send Notifications.
8 | *
9 | * The INotifier interface provides a common method called
10 | * sendNotification that relieves implementation code of the necessity to actually
11 | * construct Notifications.
12 | *
13 | * The INotifier interface, which all of the above mentioned classes extend,
14 | * provides an initialized reference to the Facade singleton, which is required by
15 | * the convenience method sendNotification for sending Notifications,
16 | * but it also eases implementation as these classes have frequent Facade
17 | * interactions and usually require access to the facade anyway.
18 | */
19 | export interface INotifier
20 | {
21 | /**
22 | * Create and send a Notification.
23 | *
24 | * Keeps us from having to construct new Notification instances in our
25 | * implementation code.
26 | *
27 | * @param name
28 | * The name of the notification to send.
29 | *
30 | * @param body
31 | * The body of the notification (optional).
32 | *
33 | * @param type
34 | * The type of the notification (optional).
35 | */
36 | sendNotification( name:string, body?:any, type?:string ):void;
37 | }
38 | }
--------------------------------------------------------------------------------
/bin/libs/min/laya.d3Plugin.min.js:
--------------------------------------------------------------------------------
1 | !function(t,i,e){e.un,e.uns,e.static;var n=e.class,r=e.getset,a=(e.__newvec,laya.d3.component.Component3D);laya.d3.core.ComponentNode,laya.d3.core.MeshTerrainSprite3D,laya.d3.core.Sprite3D,function(i){function t(){this._meshTerrainSprite3D=null,this._finder=null,this._setting=null,this.grid=null,t.__super.call(this)}n(t,"laya.d3.component.PathFind",i);var e=t.prototype;e._load=function(t){if(!(t instanceof laya.d3.core.MeshTerrainSprite3D))throw new Error("PathFinding: The owner must MeshTerrainSprite3D!");i.prototype._load.call(this,t),this._meshTerrainSprite3D=t},e.findPath=function(t,i,e,n){var r=this._meshTerrainSprite3D.minX,a=this._meshTerrainSprite3D.minZ,h=this._meshTerrainSprite3D.width/this.grid.width,s=this._meshTerrainSprite3D.depth/this.grid.height,o=h/2,d=s/2,l=Math.floor((t-r)/h),f=Math.floor((i-a)/s),c=Math.floor((e-r)/h),u=Math.floor((n-a)/s),p=this.grid.width-1,_=this.grid.height-1;p
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 | var Singleton = /** @class */ (function () {
23 | function Singleton() {
24 | }
25 | Singleton.getInstance = function () {
26 | if (!this.instance) {
27 | this.instance = new this();
28 | }
29 | return this.instance;
30 | };
31 | return Singleton;
32 | }());
33 | //# sourceMappingURL=Singleton.js.map
--------------------------------------------------------------------------------
/bin/js/framework/manager/sound/BaseSoundPlayer.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sat Aug 03 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 | var yt;
23 | (function (yt) {
24 | /**
25 | * 声音播放器模板基类
26 | */
27 | var BaseSoundPlayer = /** @class */ (function () {
28 | function BaseSoundPlayer() {
29 | }
30 | return BaseSoundPlayer;
31 | }());
32 | yt.BaseSoundPlayer = BaseSoundPlayer;
33 | })(yt || (yt = {}));
34 | //# sourceMappingURL=BaseSoundPlayer.js.map
--------------------------------------------------------------------------------
/src/framework/manager/sound/BaseSoundPlayer.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sat Aug 03 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 |
23 | namespace yt {
24 | /**
25 | * 声音播放器模板基类
26 | */
27 | export abstract class BaseSoundPlayer {
28 | /**
29 | * 播放声音
30 | */
31 | public abstract playSound(url?: string);
32 | /**
33 | * 停止播放声音
34 | */
35 | public abstract stopSound();
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/bin/js/app/ApplicationFacade.js:
--------------------------------------------------------------------------------
1 | var __extends = (this && this.__extends) || (function () {
2 | var extendStatics = function (d, b) {
3 | extendStatics = Object.setPrototypeOf ||
4 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6 | return extendStatics(d, b);
7 | };
8 | return function (d, b) {
9 | extendStatics(d, b);
10 | function __() { this.constructor = d; }
11 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12 | };
13 | })();
14 | var ApplicationFacade = /** @class */ (function (_super) {
15 | __extends(ApplicationFacade, _super);
16 | function ApplicationFacade() {
17 | return _super !== null && _super.apply(this, arguments) || this;
18 | }
19 | Object.defineProperty(ApplicationFacade, "I", {
20 | get: function () {
21 | if (!puremvc.Facade.instance)
22 | puremvc.Facade.instance = new ApplicationFacade();
23 | return puremvc.Facade.instance;
24 | },
25 | enumerable: true,
26 | configurable: true
27 | });
28 | ApplicationFacade.prototype.initializeController = function () {
29 | _super.prototype.initializeController.call(this);
30 | this.registerCommand(ApplicationFacade.STARTUP, StartupCommand);
31 | };
32 | ApplicationFacade.prototype.startup = function (stage) {
33 | _super.prototype.startup.call(this, stage);
34 | };
35 | return ApplicationFacade;
36 | }(ApplicationFacadeBase));
37 | //# sourceMappingURL=ApplicationFacade.js.map
--------------------------------------------------------------------------------
/src/framework/loaders/FileResourceLoader.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sun Aug 04 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 |
23 | module yt {
24 | export class FileResourceLoader extends BaseResourceLoader {
25 | private files: string | string[];
26 |
27 | constructor(files: string | string[], listener?: IProgressListener) {
28 | super(listener);
29 | this.files = files;
30 | }
31 |
32 | public async startLoading() {
33 | return this.load(this.files);
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/src/framework/manager/sound/MusicPlayer.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sat Aug 03 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 |
23 | namespace yt {
24 | export class MusicPlayer extends BaseSoundPlayer {
25 |
26 | private bgmUrl: string = undefined;
27 |
28 | public stopSound() {
29 | Laya.SoundManager.stopMusic();
30 | }
31 |
32 | public playSound(url?: string) {
33 | url = url || this.bgmUrl;
34 | this.bgmUrl = url;
35 |
36 | Laya.SoundManager.stopMusic();
37 | Laya.SoundManager.playMusic(url);
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/src/framework/mvc/SubMediator.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Tue Aug 06 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 |
23 | /*
24 | * view子媒介基类,属于其他界面的子节点,viewComponent由get函数传入;
25 | */
26 | class SubMediator extends BaseMediator{
27 |
28 | public init(viewComponent: any) {
29 | if (viewComponent) {
30 | this.viewComponent = viewComponent;
31 | }
32 | }
33 |
34 | protected onCreateResourceLoader(): yt.BaseResourceLoader {
35 | return null;
36 | }
37 |
38 | protected onCreateView() {
39 | return null;
40 | }
41 | }
--------------------------------------------------------------------------------
/bin/js/framework/network/HttpClient.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"HttpClient.js","sourceRoot":"","sources":["../../../../src/framework/network/HttpClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,IAAU,EAAE,CAiDX;AAjDD,WAAU,EAAE;IACR,IAAY,gBAKX;IALD,WAAY,gBAAgB;QACxB,uDAAI,CAAA;QACJ,uDAAI,CAAA;QACJ,qDAAG,CAAA;QACH,qEAAW,CAAA;IACf,CAAC,EALW,gBAAgB,GAAhB,mBAAgB,KAAhB,mBAAgB,QAK3B;IAED;QAKI;YACI,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;QACvC,CAAC;QAEM,+BAAU,GAAjB,UAAkB,OAAoB;YAClC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACvB,IAAI,CAAC,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,IAAI,gBAAgB,CAAC,IAAI,CAAC;YAC1E,IAAI,CAAC,OAAO,GAAG,EAAE,CAA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ACN;QACL,iBAAC;IAAD,CAAC,AAxCD,IAwCC;IAxCY,aAAU,aAwCtB,CAAA;AACL,CAAC,EAjDS,EAAE,KAAF,EAAE,QAiDX"}
--------------------------------------------------------------------------------
/bin/js/framework/ApplicationFacadeBase.js:
--------------------------------------------------------------------------------
1 | var __extends = (this && this.__extends) || (function () {
2 | var extendStatics = function (d, b) {
3 | extendStatics = Object.setPrototypeOf ||
4 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6 | return extendStatics(d, b);
7 | };
8 | return function (d, b) {
9 | extendStatics(d, b);
10 | function __() { this.constructor = d; }
11 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12 | };
13 | })();
14 | /**
15 | * app门面基类,必须调用startup来注册app上下文媒介
16 | */
17 | var ApplicationFacadeBase = /** @class */ (function (_super) {
18 | __extends(ApplicationFacadeBase, _super);
19 | function ApplicationFacadeBase() {
20 | return _super !== null && _super.apply(this, arguments) || this;
21 | }
22 | Object.defineProperty(ApplicationFacadeBase, "I", {
23 | get: function () {
24 | if (!puremvc.Facade.instance)
25 | puremvc.Facade.instance = new ApplicationFacadeBase();
26 | return puremvc.Facade.instance;
27 | },
28 | enumerable: true,
29 | configurable: true
30 | });
31 | /**
32 | * 启动
33 | */
34 | ApplicationFacadeBase.prototype.startup = function (stage) {
35 | this.registerMediator(new AppContextMediator(stage));
36 | this.sendNotification(ApplicationFacade.STARTUP);
37 | this.removeCommand(ApplicationFacade.STARTUP);
38 | };
39 | ApplicationFacadeBase.STARTUP = "STARTUP";
40 | return ApplicationFacadeBase;
41 | }(puremvc.Facade));
42 | //# sourceMappingURL=ApplicationFacadeBase.js.map
--------------------------------------------------------------------------------
/src/framework/loaders/ViewResourceLoader.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sun Aug 04 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 |
23 | module yt {
24 | export class ViewResourceLoader extends BaseResourceLoader {
25 | private uiView: any;
26 |
27 | constructor(uiView: any, listener?: IProgressListener) {
28 | super(listener);
29 | this.uiView = uiView;
30 | }
31 |
32 | public async startLoading() {
33 | let skins = SkinTraversal.listSkins(this.uiView);
34 | if (skins.length == 0) {
35 | return new Promise((resolve) => resolve(null));
36 | }
37 | return this.load(skins);
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/bin/js/framework/AppContextMediator.js:
--------------------------------------------------------------------------------
1 | var __extends = (this && this.__extends) || (function () {
2 | var extendStatics = function (d, b) {
3 | extendStatics = Object.setPrototypeOf ||
4 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6 | return extendStatics(d, b);
7 | };
8 | return function (d, b) {
9 | extendStatics(d, b);
10 | function __() { this.constructor = d; }
11 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12 | };
13 | })();
14 | /*
15 | * app上下文媒介,这里注册了界面的层级管理和时钟调用;
16 | */
17 | var AppContextMediator = /** @class */ (function (_super) {
18 | __extends(AppContextMediator, _super);
19 | function AppContextMediator(stage) {
20 | return _super.call(this, AppContextMediator.NAME, stage) || this;
21 | }
22 | AppContextMediator.prototype.onRegister = function () {
23 | var p = this.viewComponent;
24 | AppContextMediator.stage = p;
25 | AppContextMediator.scene = p.addChild(new DisplayObject());
26 | AppContextMediator.dialog = p.addChild(new DisplayObject());
27 | AppContextMediator.float = p.addChild(new DisplayObject());
28 | AppContextMediator.topmost = p.addChild(new DisplayObject());
29 | Laya.timer.frameLoop(1, this, this.onFrame);
30 | };
31 | AppContextMediator.prototype.onRemove = function () {
32 | this.viewComponent.removeSelf();
33 | };
34 | AppContextMediator.prototype.onFrame = function () {
35 | yt.Ticker.onFrame();
36 | };
37 | AppContextMediator.NAME = "AppContextMediator";
38 | return AppContextMediator;
39 | }(puremvc.Mediator));
40 | //# sourceMappingURL=AppContextMediator.js.map
--------------------------------------------------------------------------------
/src/framework/manager/ticker/SimpleSignal.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * @author zeh fernando
3 | */
4 | class SimpleSignal {
5 |
6 | // Properties
7 | private functions: F[];
8 |
9 |
10 | // ================================================================================================================
11 | // CONSTRUCTOR ----------------------------------------------------------------------------------------------------
12 |
13 | constructor() {
14 | this.functions = [];
15 | }
16 |
17 |
18 | // ================================================================================================================
19 | // PUBLIC INTERFACE -----------------------------------------------------------------------------------------------
20 |
21 | public add(func: F): boolean {
22 | if (this.functions.indexOf(func) === -1) {
23 | this.functions.push(func);
24 | return true;
25 | }
26 | return false;
27 | }
28 |
29 | public remove(func: F): boolean {
30 | const ifr = this.functions.indexOf(func);
31 | if (ifr > -1) {
32 | this.functions.splice(ifr, 1);
33 | return true;
34 | }
35 | return false;
36 | }
37 |
38 | public removeAll(): boolean {
39 | if (this.functions.length > 0) {
40 | this.functions.length = 0;
41 | return true;
42 | }
43 | return false;
44 | }
45 |
46 | public dispatch(...args: any[]): void {
47 | const functionsDuplicate = this.functions.concat();
48 | functionsDuplicate.forEach((func) => {
49 | func.apply(undefined, args);
50 | });
51 | }
52 |
53 |
54 | // ================================================================================================================
55 | // ACCESSOR INTERFACE ---------------------------------------------------------------------------------------------
56 |
57 | public get numItems(): number {
58 | return this.functions.length;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/src/framework/manager/resource/ResourceManager.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Tue Aug 06 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 |
23 | namespace yt {
24 | class ResourceManager {
25 | constructor() {
26 |
27 | }
28 |
29 | /**
30 | * 获取已加载到内存的资源
31 | */
32 | public get(resPath: string): any {
33 | return Laya.loader.getRes(resPath);
34 | }
35 |
36 | /**
37 | * 释放内存中的资源文件
38 | */
39 | public free(resPath: string){
40 | Laya.loader.clearRes(resPath);
41 | }
42 | }
43 |
44 | /**
45 | * 资源管理器,负责资源的获取和销毁
46 | */
47 | export const RES = new ResourceManager();
48 | }
--------------------------------------------------------------------------------
/bin/js/framework/manager/ticker/TickerManager.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"TickerManager.js","sourceRoot":"","sources":["../../../../../src/framework/manager/ticker/TickerManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,IAAU,EAAE,CAkDX;AAlDD,WAAU,EAAE;IACX;QAAA;YACS,YAAO,GAAkB,EAAE,CAAC;QA6CrC,CAAC;QA3CO,+BAAO,GAAd;YACC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,UAAC,MAAM,EAAE,KAAK,EAAE,KAAK;gBACzC,MAAM,CAAC,OAAO,EAAE,CAAC;gBACjB,IAAI,MAAM,CAAC,UAAU,EAAE;oBACtB,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;oBACvB,GAAA,UAAU,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;iBACzC;YACF,CAAC,CAAC,CAAC;QACJ,CAAC;QAEM,6BAAK,GAAZ,UAAa,QAAgB,EAAE,QAAkB,EAAE,MAAY;YAC9D,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;QAC5D,CAAC;QAEM,6BAAK,GAAZ,UAAa,KAAa,EAAE,QAAkB,EAAE,MAAY;YAC3D,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;QAC5D,CAAC;QAEM,6BAAK,G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AAE,QAkDX"}
--------------------------------------------------------------------------------
/src/LayaUISample.ts:
--------------------------------------------------------------------------------
1 | import test = ui.test.TestPageUI;
2 | import Label = Laya.Label;
3 | import Handler = Laya.Handler;
4 | import Loader = Laya.Loader;
5 | import WebGL = Laya.WebGL;
6 |
7 | class TestUI extends ui.test.TestPageUI {
8 |
9 | constructor() {
10 | super();
11 | //btn是编辑器界面设定的,代码里面能直接使用,并且有代码提示
12 | this.btn.on(Laya.Event.CLICK, this, this.onBtnClick);
13 | this.btn2.on(Laya.Event.CLICK, this, this.onBtn2Click);
14 | }
15 |
16 | private onBtnClick(): void {
17 | //手动控制组件属性
18 | this.radio.selectedIndex = 1;
19 | this.clip.index = 8;
20 | this.tab.selectedIndex = 2;
21 | this.combobox.selectedIndex = 0;
22 | this.check.selected = true;
23 | }
24 |
25 | private onBtn2Click(): void {
26 | //通过赋值可以简单快速修改组件属性
27 | //赋值有两种方式:
28 | //简单赋值,比如:progress:0.2,就是更改progress组件的value为2
29 | //复杂复制,可以通知某个属性,比如:label:{color:"#ff0000",text:"Hello LayaAir"}
30 | this.box.dataSource = { slider: 50, scroll: 80, progress: 0.2, input: "This is a input", label: { color: "#ff0000", text: "Hello LayaAir" } };
31 |
32 | //list赋值,先获得一个数据源数组
33 | var arr: Array = [];
34 | for (var i: number = 0; i < 100; i++) {
35 | arr.push({ label: "item " + i, clip: i % 9 });
36 | }
37 |
38 | //给list赋值更改list的显示
39 | this.list.array = arr;
40 |
41 | //还可以自定义list渲染方式,可以打开下面注释看一下效果
42 | //list.renderHandler = new Handler(this, onListRender);
43 | }
44 |
45 | private onListRender(item: Laya.Box, index: number): void {
46 | //自定义list的渲染方式
47 | var label: Label = item.getChildByName("label") as Label;
48 | if (index % 2) {
49 | label.color = "#ff0000";
50 | } else {
51 | label.color = "#000000";
52 | }
53 | }
54 | }
55 |
56 | //程序入口
57 | Laya.init(600, 400, WebGL);
58 | //激活资源版本控制
59 | Laya.ResourceVersion.enable("version.json", Handler.create(null, beginLoad), Laya.ResourceVersion.FILENAME_VERSION);
60 |
61 | function beginLoad(){
62 | ApplicationFacade.I.startup(Laya.stage);
63 | }
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/core/Controller.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"Controller.js","sourceRoot":"","sources":["../../../../../../../../src/framework/mvc/org/puremvc/typescript/core/Controller.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,6EAA6E;AAC7E,qFAAqF;AACrF,gFAAgF;AAChF,uFAAuF;AACvF,sEAAsE;AAEtE,IAAO,OAAO,CA0Mb;AA1MD,WAAO,OAAO;IAEb,YAAY,CAAC;IAEb;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH;QAiBC;;;;;;;;;;WAUG;QACH;YAzBA;;;;eAIG;YACH,SAAI,GAAS,IAAI,CAAC;YAElB;;;;eAIG;YACH,eAAU,GAAU,IAAI,CAAC;YAexB,IAAI,UAAU,CAAC,QAAQ;gBACtB,MAAM,KAAK,CAAE,UAAU,CAAC,aAAa,CAAE,CAAC;YAEzC,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC;YAC3B,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;YACrB,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC7B,CAAC;QAED;;;;;;;;;;;;;;;;;;WAkBG;QACH,yCAAoB,GAApB;YAEC,IAAI,CAAC,IAAI,GAAG,QAAA,IAAI,CAAC,WAAW,EAAE,CAAC;QAChC,CAAC;QAED;;;;;;WAMG;QACH,mCAAc,GAAd,UAAgB,YAA0B;YAEzC;;;;eAIG;YACH,IAAI,eAAe,GAAO,IAAI,CAAC,UAAU,CAAE,YAAY,CAAC,OAAO,EAAE,CAAE,CAAC;YACpE,IAAI,eAAe,EACnB;gBACC,IAAI,OAAO,GAA+B,IAAI,eAAe,EAAE,CAAC;gBAChE,OAAO,CAAC,OAAO,CAAE,YAAY,CAAE,CAAC;aAChC;QAEF,CAAC;QAED;;;;;;;;;;;;;;;;;WAiBG;QACH,oCAAe,GAAf,UAAiB,gBAAuB,EAAE,eAAwB;YAEjE,IAAI,CAAC,IAAI,CAAC,UAAU,CAAE,gBAAgB,CAAE;gBACvC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAE,gBAAgB,EAAE,IAAI,QAAA,QAAQ,CAAE,IAAI,CAAC,cAAc,EAAE,IAAI,CAAE,CAAE,CAAC;YAE3F,IAAI,CAAC,UAAU,CAAE,gBAAgB,CAAE,GAAG,eAAe,CAAC;QACvD,CAAC;QAED;;;;;;;;;;WAUG;QACH,+BAAU,GAAV,UAAY,gBAAuB;YAElC,OAAO,IAAI,CAAC,UAAU,CAAE,gBAAgB,CAAE,IAAI,IAAI,CAAC;QACpD,CAAC;QAED;;;;;;;WAOG;QACH,kCAAa,GAAb,UAAe,gBAAuB;YAErC,kCAAkC;YAClC,IAAI,IAAI,CAAC,UAAU,CAAE,gBAAgB,CAAE,EACvC;gBACC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAE,gBAAgB,EAAE,IAAI,CAAE,CAAC;gBACnD,OAAO,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;aACzC;QACF,CAAC;QAkBD;;;;;WAKG;QACI,sBAAW,GAAlB;YAEC,IAAI,CAAC,UAAU,CAAC,QAAQ;gBACvB,UAAU,CAAC,QAAQ,GAAG,IAAI,UAAU,EAAE,CAAC;YAExC,OAAO,UAAU,CAAC,QAAQ,CAAC;QAC5B,CAAC;QArBD;;;;;;WAMG;QACI,wBAAa,GAAU,2CAA2C,CAAC;QAe3E,iBAAC;KAAA,AA9KD,IA8KC;IA9KY,kBAAU,aA8KtB,CAAA;AACF,CAAC,EA1MM,OAAO,KAAP,OAAO,QA0Mb"}
--------------------------------------------------------------------------------
/bin/js/LayaUISample.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"LayaUISample.js","sourceRoot":"","sources":["../../src/LayaUISample.ts"],"names":[],"mappings":";;;;;;;;;;;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AG,GAAe,EAAE,CAAC;QACzB,KAAK,IAAI,CAAC,GAAW,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;YACrC,GAAG,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;SAC9C;QAED,kBAAkB;QAClB,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;QAEtB,8BAA8B;QAC9B,uDAAuD;IACxD,CAAC;IAEO,6BAAY,GAApB,UAAqB,IAAc,EAAE,KAAa;QACjD,cAAc;QACd,IAAI,KAAK,GAAU,IAAI,CAAC,cAAc,CAAC,OAAO,CAAU,CAAC;QACzD,IAAI,KAAK,GAAG,CAAC,EAAE;YACd,KAAK,CAAC,KAAK,GAAG,SAAS,CAAC;SACxB;aAAM;YACN,KAAK,CAAC,KAAK,GAAG,SAAS,CAAC;SACxB;IACF,CAAC;IACF,aAAC;AAAD,CAAC,AA/CD,CAAqB,EAAE,CAAC,IAAI,CAAC,UAAU,GA+CtC;AAED,MAAM;AACN,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AAC3B,UAAU;AACV,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,cAAc,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,CAAC;AAEpH,SAAS,SAAS;IACjB,iBAAiB,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACzC,CAAC"}
--------------------------------------------------------------------------------
/bin/js/framework/manager/resource/ResourceManager.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Tue Aug 06 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 | var yt;
23 | (function (yt) {
24 | var ResourceManager = /** @class */ (function () {
25 | function ResourceManager() {
26 | }
27 | /**
28 | * 获取已加载到内存的资源
29 | */
30 | ResourceManager.prototype.get = function (resPath) {
31 | return Laya.loader.getRes(resPath);
32 | };
33 | /**
34 | * 释放内存中的资源文件
35 | */
36 | ResourceManager.prototype.free = function (resPath) {
37 | Laya.loader.clearRes(resPath);
38 | };
39 | return ResourceManager;
40 | }());
41 | /**
42 | * 资源管理器,负责资源的获取和销毁
43 | */
44 | yt.RES = new ResourceManager();
45 | })(yt || (yt = {}));
46 | //# sourceMappingURL=ResourceManager.js.map
--------------------------------------------------------------------------------
/src/framework/mvc/org/puremvc/typescript/interfaces/IProxy.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | module puremvc
4 | {
5 | /**
6 | * The interface definition for a PureMVC Proxy.
7 | *
8 | * In PureMVC, IProxy implementors assume these responsibilities:
9 | *
10 | * - Implement a common method which returns the name of the Proxy.
11 | *
- Provide methods for setting and getting the data object.
12 | *
13 | * Additionally,
IProxys typically:
14 | *
15 | * - Maintain references to one or more pieces of model data.
16 | *
- Provide methods for manipulating that data.
17 | *
- Generate
INotifications when their model data changes.
18 | * - Expose their name as a
constant called NAME, if they are not
19 | * instantiated multiple times.
20 | * - Encapsulate interaction with local or remote services used to fetch and persist model
21 | * data.
22 | */
23 | export interface IProxy
24 | extends INotifier
25 | {
26 | /**
27 | * Get the name of the
IProxy> instance.
28 | *
29 | * @return
30 | * The name of the IProxy> instance.
31 | */
32 | getProxyName():string;
33 |
34 | /**
35 | * Set the data of the IProxy> instance.
36 | *
37 | * @param data
38 | * The data to set for the IProxy> instance.
39 | */
40 | setData( data:any ):void;
41 |
42 | /**
43 | * Get the data of the IProxy> instance.
44 | *
45 | * @return
46 | * The data held in the IProxy instance.
47 | */
48 | getData():any;
49 |
50 | /**
51 | * Called by the Model when the IProxy is registered. This method has to be
52 | * overridden by the subclass to know when the instance is registered.
53 | */
54 | onRegister( ):void;
55 |
56 | /**
57 | * Called by the Model when the IProxy is removed. This method has to be
58 | * overridden by the subclass to know when the instance is removed.
59 | */
60 | onRemove( ):void;
61 | }
62 | }
--------------------------------------------------------------------------------
/src/framework/pool/TickerPool.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sat Aug 03 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 |
23 | namespace yt {
24 | export type TickerOptions = { interval: number, maxTick?: number };
25 |
26 | export class TickerPool extends Singleton {
27 | private pool: ObjectPool;
28 | constructor() {
29 | super();
30 | this.pool = ObjectPool.create({
31 | name: "TickerPool",
32 | factory: this.createTicker.bind(this),
33 | initialize: this.initTicker.bind(this)
34 | });
35 | }
36 |
37 | private createTicker(): FrameTicker {
38 | return new FrameTicker();
39 | }
40 |
41 | private initTicker(ticker: FrameTicker, options: TickerOptions) {
42 | ticker.initialize(options.interval, options.maxTick);
43 | }
44 |
45 | public get(options: TickerOptions): FrameTicker {
46 | return this.pool.get(options);
47 | }
48 |
49 | public reclaim(ticker: FrameTicker) {
50 | this.pool.reclaim(ticker);
51 | }
52 |
53 | }
54 |
55 | }
--------------------------------------------------------------------------------
/src/framework/loaders/SkinTraversal.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sat Aug 03 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 |
23 | namespace yt {
24 | /*
25 | * 遍历出laya的ui结构中用到的资源;
26 | */
27 | export class SkinTraversal {
28 | public static listSkins(root: any): string[] {
29 | let skins = [];
30 | this.traverseChild(root, skins);
31 | return skins;
32 | }
33 |
34 | private static traverseChild(root: any, skins: string[]) {
35 | if(!root.child) {
36 | return;
37 | }
38 |
39 | for (let child of root.child) {
40 | if (child.props && child.props.skin) {
41 | skins.push(child.props.skin);
42 | }
43 |
44 | if (child.child) {
45 | this.traverseChild(child, skins);
46 | }
47 | }
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/framework/loaders/BaseResourceLoader.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sat Aug 03 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 |
23 | declare var Promise: PromiseConstructorLike;
24 | module yt {
25 | export abstract class BaseResourceLoader {
26 | protected onProgressListener: IProgressListener = undefined;
27 |
28 | constructor(listener?: IProgressListener) {
29 | if (listener) {
30 | this.onProgressListener = listener;
31 | }
32 | }
33 |
34 | public setOnProgressListener(listener: IProgressListener) {
35 | this.onProgressListener = listener;
36 | }
37 |
38 | protected async load(files: string | string[]) {
39 | return new Promise((resolve, reject) => {
40 | Laya.loader.load(files,
41 | Handler.create(null, (res: any) => {
42 | resolve(res);
43 | }),
44 | Handler.create(null, (v) => {
45 | this.onProgressListener && this.onProgressListener.onProgress(v);
46 | }, null, false)
47 | );
48 | });
49 | }
50 |
51 | public abstract async startLoading();
52 | }
53 | }
--------------------------------------------------------------------------------
/bin/js/framework/pool/ObjectPool.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"ObjectPool.js","sourceRoot":"","sources":["../../../../src/framework/pool/ObjectPool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,IAAU,EAAE,CA6GX;AA7GD,WAAU,EAAE;IAEX,IAAI,MAAM,GAAG,CAAC,EACb,IAAI,GAAG,cAAc,CAAC,CAAC;IACxB;;MAEE;IACF;QAgBC,oBAAY,IAAY,EAAE,OAAiB,EAAE,UAAqB,EAAE,qBAA8B,EAAE,gBAAyB;YAC5H,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,eAAe,GAAG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AAC,kBAAkB,CAAC,OAAO,EAAE,qBAAqB,CAAC,CAAC;YAExD,OAAO,OAAO,CAAC;QAChB,CAAC;QAAA,CAAC;QAEF;;WAEG;QACI,4BAAO,GAAd,UAAe,OAAO;YACrB,IAAI,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE;gBACpD,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;aACtC;YAED,OAAO,IAAI,CAAC;QACb,CAAC;QAAA,CAAC;QAEF;;WAEG;QACI,0BAAK,GAAZ;YACC,OAAO,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE;gBACtC,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,CAAC;aAC9B;YAED,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC;YAExB,OAAO,IAAI,CAAC;QACb,CAAC;QAAA,CAAC;QAEK,6BAAQ,GAAf;YACC,OAAO,IAAI,CAAC,IAAI,GAAG,KAAK,GAAG,IAAI,CAAC,cAAc,GAAG,oBAAoB,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,GAAG,sBAAsB,CAAC;QACjI,CAAC;QAAA,CAAC;QACH,iBAAC;IAAD,CAAC,AArGD,IAqGC;IArGY,aAAU,aAqGtB,CAAA;AACF,CAAC,EA7GS,EAAE,KAAF,EAAE,QA6GX;AAED;IAAA;IAIA,CAAC;IAHO,oBAAM,GAAb,UAAiB,CAAgB;QAChC,OAAO,IAAI,CAAC,EAAE,CAAC;IAChB,CAAC;IACF,oBAAC;AAAD,CAAC,AAJD,IAIC"}
--------------------------------------------------------------------------------
/src/framework/mvc/org/puremvc/typescript/patterns/observer/Notifier.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | ///
5 |
6 | module puremvc
7 | {
8 | "use strict";
9 |
10 | /**
11 | * A base INotifier implementation.
12 | *
13 | * MacroCommand, SimpleCommand, Mediator and
14 | * Proxy all have a need to send Notifications.
15 | *
16 | * The INotifier interface provides a common method called
17 | * sendNotification that relieves implementation code of the necessity to actually
18 | * construct Notifications.
19 | *
20 | * The INotifier interface, which all of the above mentioned classes extend,
21 | * provides an initialized reference to the Facade singleton, which is required by
22 | * the convenience method sendNotification for sending Notifications,
23 | * but it also eases implementation as these classes have frequent Facade
24 | * interactions and usually require access to the facade anyway.
25 | */
26 | export class Notifier
27 | implements INotifier
28 | {
29 | /**
30 | * Local reference to the singleton Facade.
31 | *
32 | * @protected
33 | */
34 | facade:IFacade = null;
35 |
36 | /**
37 | * Constructs a Notifier instance.
38 | */
39 | constructor()
40 | {
41 | this.facade = Facade.getInstance();
42 | }
43 |
44 | /**
45 | * Create and send a Notification.
46 | *
47 | * Keeps us from having to construct new Notification instances in our
48 | * implementation code.
49 | *
50 | * @param name
51 | * The name of the notification to send.
52 | *
53 | * @param body
54 | * The body of the notification.
55 | *
56 | * @param type
57 | * The type of the notification.
58 | */
59 | sendNotification( name:string, body:any=null, type:string=null ):void
60 | {
61 | this.facade.sendNotification( name, body, type );
62 | }
63 | }
64 | }
--------------------------------------------------------------------------------
/bin/js/framework/loaders/SkinTraversal.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sat Aug 03 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 | var yt;
23 | (function (yt) {
24 | /*
25 | * 遍历出laya的ui结构中用到的资源;
26 | */
27 | var SkinTraversal = /** @class */ (function () {
28 | function SkinTraversal() {
29 | }
30 | SkinTraversal.listSkins = function (root) {
31 | var skins = [];
32 | this.traverseChild(root, skins);
33 | return skins;
34 | };
35 | SkinTraversal.traverseChild = function (root, skins) {
36 | if (!root.child) {
37 | return;
38 | }
39 | for (var _i = 0, _a = root.child; _i < _a.length; _i++) {
40 | var child = _a[_i];
41 | if (child.props && child.props.skin) {
42 | skins.push(child.props.skin);
43 | }
44 | if (child.child) {
45 | this.traverseChild(child, skins);
46 | }
47 | }
48 | };
49 | return SkinTraversal;
50 | }());
51 | yt.SkinTraversal = SkinTraversal;
52 | })(yt || (yt = {}));
53 | //# sourceMappingURL=SkinTraversal.js.map
--------------------------------------------------------------------------------
/bin/js/framework/manager/ticker/SimpleSignal.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @author zeh fernando
3 | */
4 | var SimpleSignal = /** @class */ (function () {
5 | // ================================================================================================================
6 | // CONSTRUCTOR ----------------------------------------------------------------------------------------------------
7 | function SimpleSignal() {
8 | this.functions = [];
9 | }
10 | // ================================================================================================================
11 | // PUBLIC INTERFACE -----------------------------------------------------------------------------------------------
12 | SimpleSignal.prototype.add = function (func) {
13 | if (this.functions.indexOf(func) === -1) {
14 | this.functions.push(func);
15 | return true;
16 | }
17 | return false;
18 | };
19 | SimpleSignal.prototype.remove = function (func) {
20 | var ifr = this.functions.indexOf(func);
21 | if (ifr > -1) {
22 | this.functions.splice(ifr, 1);
23 | return true;
24 | }
25 | return false;
26 | };
27 | SimpleSignal.prototype.removeAll = function () {
28 | if (this.functions.length > 0) {
29 | this.functions.length = 0;
30 | return true;
31 | }
32 | return false;
33 | };
34 | SimpleSignal.prototype.dispatch = function () {
35 | var args = [];
36 | for (var _i = 0; _i < arguments.length; _i++) {
37 | args[_i] = arguments[_i];
38 | }
39 | var functionsDuplicate = this.functions.concat();
40 | functionsDuplicate.forEach(function (func) {
41 | func.apply(undefined, args);
42 | });
43 | };
44 | Object.defineProperty(SimpleSignal.prototype, "numItems", {
45 | // ================================================================================================================
46 | // ACCESSOR INTERFACE ---------------------------------------------------------------------------------------------
47 | get: function () {
48 | return this.functions.length;
49 | },
50 | enumerable: true,
51 | configurable: true
52 | });
53 | return SimpleSignal;
54 | }());
55 | //# sourceMappingURL=SimpleSignal.js.map
--------------------------------------------------------------------------------
/src/framework/loaders/GroupResourceLoader.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sun Aug 04 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 |
23 | module yt {
24 | export class GroupResourceLoader extends BaseResourceLoader implements IProgressListener {
25 | private loaders: BaseResourceLoader[];
26 | /** 百分比比例 */
27 | private ratio: number;
28 | /** 当前总进度 */
29 | private totalProgress: number;
30 | /** 当前加载序号 */
31 | private curLoaderIndex: number;
32 |
33 | constructor(loaders: BaseResourceLoader[], listener?: IProgressListener) {
34 | super(listener);
35 | this.loaders = loaders;
36 | this.ratio = 1 / loaders.length;
37 |
38 | for (let loader of loaders) {
39 | loader.setOnProgressListener(this);
40 | }
41 | }
42 |
43 | public async startLoading() {
44 | this.totalProgress = 0;
45 | this.curLoaderIndex = 0;
46 | for (let loader of this.loaders) {
47 | await loader.startLoading();
48 | this.totalProgress += this.ratio;
49 | this.curLoaderIndex++;
50 | }
51 | }
52 |
53 | onProgress(value: number) {
54 | this.onProgressListener.onProgress(this.totalProgress + value * this.ratio);
55 | }
56 | }
57 | }
--------------------------------------------------------------------------------
/src/framework/pool/HttpClientPool.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sat Aug 03 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 |
23 | namespace yt {
24 | export type HttpOptions = {
25 | url: string;
26 | responseType?: HttpResponseType;
27 | /**
28 | * {"Content-Type": "application/json"}
29 | */
30 | headers?: any;
31 | };
32 |
33 | /**
34 | * http请求池
35 | */
36 | export class HttpClientPool extends Singleton {
37 | public pool: ObjectPool;
38 | constructor() {
39 | super();
40 | this.pool = ObjectPool.create({
41 | name: "HttpClientPool",
42 | firstAllocationNumber: 1,
43 | factory: this.createHttpClient.bind(this),
44 | initialize: this.initHttpClient.bind(this)
45 | });
46 | }
47 |
48 | private createHttpClient(): HttpClient {
49 | return new HttpClient();
50 | }
51 |
52 | private initHttpClient(client: HttpClient, options: HttpOptions) {
53 | client.initialize(options);
54 | }
55 |
56 | public static get(options: HttpOptions): HttpClient {
57 | return HttpClientPool.getInstance().pool.get(options);
58 | }
59 |
60 | public static reclaim(client: HttpClient) {
61 | HttpClientPool.getInstance().pool.reclaim(client);
62 | }
63 |
64 | }
65 |
66 | }
--------------------------------------------------------------------------------
/src/framework/mvc/org/puremvc/typescript/interfaces/IModel.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | module puremvc
4 | {
5 | /**
6 | * The interface definition for a PureMVC Model.
7 | *
8 | * In PureMVC, the IModel class provides access to model objects
9 | * Proxies by named lookup.
10 | *
11 | * The Model assumes these responsibilities:
12 | *
13 | * - Maintain a cache of
IProxy instances.
14 | * - Provide methods for registering, retrieving, and removing
Proxy instances.
15 | *
16 | * Your application must register IProxy instances with the Model.
17 | * Typically, you use an ICommand to create and register Proxy instances
18 | * once the Facade has initialized the Core actors.
19 | */
20 | export interface IModel
21 | {
22 | /**
23 | * Register an IProxy with the Model.
24 | *
25 | * @param proxy
26 | * An IProxy to be held by the Model.
27 | */
28 | registerProxy( proxy:IProxy ):void;
29 |
30 | /**
31 | * Remove an IProxy from the Model.
32 | *
33 | * @param proxyName
34 | * The name of the Proxy instance to be removed.
35 | *
36 | * @return
37 | * The IProxy that was removed from the Model or an
38 | * explicit null if the IProxy didn't exist.
39 | */
40 | removeProxy( proxyName:string ):IProxy;
41 |
42 | /**
43 | * Retrieve an IProxy from the Model.
44 | *
45 | * @param proxyName
46 | * The IProxy name to retrieve from the Model.
47 | *
48 | * @return
49 | * The IProxy instance previously registered with the given
50 | * proxyName or an explicit null if it doesn't exists.
51 | */
52 | retrieveProxy( proxyName:string ):IProxy;
53 |
54 | /**
55 | * Check if a Proxy is registered
56 | *
57 | * @param proxyName
58 | * The name of the IProxy to verify the existence of its registration.
59 | *
60 | * @return
61 | * A Proxy is currently registered with the given proxyName.
62 | */
63 | hasProxy( proxyName:string ):bool;
64 | }
65 | }
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/patterns/command/SimpleCommand.js:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | var __extends = (this && this.__extends) || (function () {
5 | var extendStatics = function (d, b) {
6 | extendStatics = Object.setPrototypeOf ||
7 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
8 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
9 | return extendStatics(d, b);
10 | };
11 | return function (d, b) {
12 | extendStatics(d, b);
13 | function __() { this.constructor = d; }
14 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15 | };
16 | })();
17 | ///
18 | var puremvc;
19 | (function (puremvc) {
20 | "use strict";
21 | /**
22 | * A base ICommand implementation.
23 | *
24 | * Your subclass should override the execute method where your business logic will
25 | * handle the INotification.
26 | */
27 | var SimpleCommand = /** @class */ (function (_super) {
28 | __extends(SimpleCommand, _super);
29 | function SimpleCommand() {
30 | return _super !== null && _super.apply(this, arguments) || this;
31 | }
32 | /**
33 | * Fulfill the use-case initiated by the given INotification.
34 | *
35 | * In the Command Pattern, an application use-case typically begins with some user action,
36 | * which results in an INotification being broadcast, which is handled by
37 | * business logic in the execute method of an ICommand.
38 | *
39 | * @param notification
40 | * The INotification to handle.
41 | */
42 | SimpleCommand.prototype.execute = function (notification) {
43 | };
44 | return SimpleCommand;
45 | }(puremvc.Notifier));
46 | puremvc.SimpleCommand = SimpleCommand;
47 | })(puremvc || (puremvc = {}));
48 | //# sourceMappingURL=SimpleCommand.js.map
--------------------------------------------------------------------------------
/bin/js/framework/manager/sound/EffectPlayer.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sat Aug 03 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 | var __extends = (this && this.__extends) || (function () {
23 | var extendStatics = function (d, b) {
24 | extendStatics = Object.setPrototypeOf ||
25 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
27 | return extendStatics(d, b);
28 | };
29 | return function (d, b) {
30 | extendStatics(d, b);
31 | function __() { this.constructor = d; }
32 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33 | };
34 | })();
35 | var yt;
36 | (function (yt) {
37 | var EffectPlayer = /** @class */ (function (_super) {
38 | __extends(EffectPlayer, _super);
39 | function EffectPlayer() {
40 | return _super !== null && _super.apply(this, arguments) || this;
41 | }
42 | EffectPlayer.prototype.stopSound = function () {
43 | Laya.SoundManager.stopAllSound();
44 | };
45 | EffectPlayer.prototype.playSound = function (url) {
46 | Laya.SoundManager.playSound(url);
47 | };
48 | return EffectPlayer;
49 | }(yt.BaseSoundPlayer));
50 | yt.EffectPlayer = EffectPlayer;
51 | })(yt || (yt = {}));
52 | //# sourceMappingURL=EffectPlayer.js.map
--------------------------------------------------------------------------------
/bin/js/framework/mvc/SubMediator.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Tue Aug 06 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 | var __extends = (this && this.__extends) || (function () {
23 | var extendStatics = function (d, b) {
24 | extendStatics = Object.setPrototypeOf ||
25 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
27 | return extendStatics(d, b);
28 | };
29 | return function (d, b) {
30 | extendStatics(d, b);
31 | function __() { this.constructor = d; }
32 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33 | };
34 | })();
35 | /*
36 | * view子媒介基类,属于其他界面的子节点,viewComponent由get函数传入;
37 | */
38 | var SubMediator = /** @class */ (function (_super) {
39 | __extends(SubMediator, _super);
40 | function SubMediator() {
41 | return _super !== null && _super.apply(this, arguments) || this;
42 | }
43 | SubMediator.prototype.init = function (viewComponent) {
44 | if (viewComponent) {
45 | this.viewComponent = viewComponent;
46 | }
47 | };
48 | SubMediator.prototype.onCreateResourceLoader = function () {
49 | return null;
50 | };
51 | SubMediator.prototype.onCreateView = function () {
52 | return null;
53 | };
54 | return SubMediator;
55 | }(BaseMediator));
56 | //# sourceMappingURL=SubMediator.js.map
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/patterns/observer/Notifier.js:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | var puremvc;
5 | (function (puremvc) {
6 | "use strict";
7 | /**
8 | * A base INotifier implementation.
9 | *
10 | * MacroCommand, SimpleCommand, Mediator and
11 | * Proxy all have a need to send Notifications.
12 | *
13 | * The INotifier interface provides a common method called
14 | * sendNotification that relieves implementation code of the necessity to actually
15 | * construct Notifications.
16 | *
17 | * The INotifier interface, which all of the above mentioned classes extend,
18 | * provides an initialized reference to the Facade singleton, which is required by
19 | * the convenience method sendNotification for sending Notifications,
20 | * but it also eases implementation as these classes have frequent Facade
21 | * interactions and usually require access to the facade anyway.
22 | */
23 | var Notifier = /** @class */ (function () {
24 | /**
25 | * Constructs a Notifier instance.
26 | */
27 | function Notifier() {
28 | /**
29 | * Local reference to the singleton Facade.
30 | *
31 | * @protected
32 | */
33 | this.facade = null;
34 | this.facade = puremvc.Facade.getInstance();
35 | }
36 | /**
37 | * Create and send a Notification.
38 | *
39 | * Keeps us from having to construct new Notification instances in our
40 | * implementation code.
41 | *
42 | * @param name
43 | * The name of the notification to send.
44 | *
45 | * @param body
46 | * The body of the notification.
47 | *
48 | * @param type
49 | * The type of the notification.
50 | */
51 | Notifier.prototype.sendNotification = function (name, body, type) {
52 | if (body === void 0) { body = null; }
53 | if (type === void 0) { type = null; }
54 | this.facade.sendNotification(name, body, type);
55 | };
56 | return Notifier;
57 | }());
58 | puremvc.Notifier = Notifier;
59 | })(puremvc || (puremvc = {}));
60 | //# sourceMappingURL=Notifier.js.map
--------------------------------------------------------------------------------
/src/framework/mvc/org/puremvc/typescript/interfaces/IObserver.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | module puremvc
4 | {
5 | /**
6 | * The interface definition for a PureMVC Observer.
7 | *
8 | * In PureMVC, IObserver implementors assumes these responsibilities:
9 | *
10 | * - Encapsulate the notification (callback) method of the interested object.
11 | *
- Encapsulate the notification context (this) of the interested object.
12 | *
- Provide methods for setting the interested object notification method and context.
13 | *
- Provide a method for notifying the interested object.
14 | *
15 | * PureMVC does not rely upon underlying event models such as the one provided in JavaScript DOM API,
16 | * and JavaScript does not have an inherent event model.
17 | *
18 | * The Observer Pattern as implemented within PureMVC exists to support event driven
19 | * communication between the application and the actors of the MVC triad (Model, View, Controller).
20 | *
21 | * An Observer is an object that encapsulates information about an interested object with a
22 | * notification method that should be called when an
INotification is broadcast.
23 | * The Observer then acts as a proxy for notifying the interested object.
24 | *
25 | * Observers can receive Notifications by having their notifyObserver
26 | * method invoked, passing in an object implementing the INotification interface,
27 | * such as a subclass of Notification.
28 | */
29 | export interface IObserver
30 | {
31 | /**
32 | * Set the notification method.
33 | *
34 | * The notification method should take one parameter of type INotification.
35 | *
36 | * @param notifyMethod
37 | * The notification (callback) method of the interested object.
38 | */
39 | setNotifyMethod( notifyMethod:Function ):void;
40 |
41 | /**
42 | /**
43 | * Set the notification context.
44 | *
45 | * @param notifyContext
46 | * The notification context (this) of the interested object.
47 | */
48 | setNotifyContext( notifyContext:any ):void;
49 |
50 | /**
51 | * Notify the interested object.
52 | *
53 | * @param notification
54 | * The INotification to pass to the interested object's notification
55 | * method.
56 | */
57 | notifyObserver( notification:INotification ):void;
58 |
59 | /**
60 | * Compare an object to the notification context.
61 | *
62 | * @param object
63 | * The object to compare.
64 | *
65 | * @return
66 | * The object and the notification context are the same.
67 | */
68 | compareNotifyContext( object:any ):bool;
69 | }
70 | }
--------------------------------------------------------------------------------
/src/framework/presence/LocalPresence.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sat Aug 03 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 |
23 | namespace yt {
24 |
25 | class LocalPresenceImpl implements IPresence {
26 |
27 | private data = {};
28 |
29 | constructor() {
30 | }
31 |
32 | set(key: string, value: string | Object): any {
33 | this.data[key] = value;
34 | try {
35 | if (typeof value === 'string') {
36 | Laya.LocalStorage.setItem(key, value);
37 | } else {
38 | Laya.LocalStorage.setJSON(key, value);
39 | }
40 | } catch (error) {
41 | console.error(error);
42 | }
43 | }
44 |
45 | get(key: string): T {
46 | if (!this.data[key]) {
47 | let str = Laya.LocalStorage.getItem(key);
48 | try {
49 | let obj = JSON.parse(str);
50 | if (obj && typeof obj == 'object') {
51 | this.data[key] = obj;
52 | } else {
53 | this.data[key] = str;
54 | }
55 | } catch (error) {
56 | this.data[key] = str;
57 | }
58 | }
59 |
60 | return this.data[key];
61 | }
62 |
63 | del(key) {
64 | delete this.data[key];
65 | Laya.LocalStorage.removeItem(key);
66 | }
67 |
68 | }
69 |
70 | export const LocalPresence: IPresence = new LocalPresenceImpl();
71 |
72 | }
--------------------------------------------------------------------------------
/bin/js/framework/manager/sound/MusicPlayer.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sat Aug 03 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 | var __extends = (this && this.__extends) || (function () {
23 | var extendStatics = function (d, b) {
24 | extendStatics = Object.setPrototypeOf ||
25 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
27 | return extendStatics(d, b);
28 | };
29 | return function (d, b) {
30 | extendStatics(d, b);
31 | function __() { this.constructor = d; }
32 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33 | };
34 | })();
35 | var yt;
36 | (function (yt) {
37 | var MusicPlayer = /** @class */ (function (_super) {
38 | __extends(MusicPlayer, _super);
39 | function MusicPlayer() {
40 | var _this = _super !== null && _super.apply(this, arguments) || this;
41 | _this.bgmUrl = undefined;
42 | return _this;
43 | }
44 | MusicPlayer.prototype.stopSound = function () {
45 | Laya.SoundManager.stopMusic();
46 | };
47 | MusicPlayer.prototype.playSound = function (url) {
48 | url = url || this.bgmUrl;
49 | this.bgmUrl = url;
50 | Laya.SoundManager.stopMusic();
51 | Laya.SoundManager.playMusic(url);
52 | };
53 | return MusicPlayer;
54 | }(yt.BaseSoundPlayer));
55 | yt.MusicPlayer = MusicPlayer;
56 | })(yt || (yt = {}));
57 | //# sourceMappingURL=MusicPlayer.js.map
--------------------------------------------------------------------------------
/bin/js/LayaUISample.js:
--------------------------------------------------------------------------------
1 | var __extends = (this && this.__extends) || (function () {
2 | var extendStatics = function (d, b) {
3 | extendStatics = Object.setPrototypeOf ||
4 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6 | return extendStatics(d, b);
7 | };
8 | return function (d, b) {
9 | extendStatics(d, b);
10 | function __() { this.constructor = d; }
11 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12 | };
13 | })();
14 | var test = ui.test.TestPageUI;
15 | var Label = Laya.Label;
16 | var Handler = Laya.Handler;
17 | var Loader = Laya.Loader;
18 | var WebGL = Laya.WebGL;
19 | var TestUI = /** @class */ (function (_super) {
20 | __extends(TestUI, _super);
21 | function TestUI() {
22 | var _this = _super.call(this) || this;
23 | //btn是编辑器界面设定的,代码里面能直接使用,并且有代码提示
24 | _this.btn.on(Laya.Event.CLICK, _this, _this.onBtnClick);
25 | _this.btn2.on(Laya.Event.CLICK, _this, _this.onBtn2Click);
26 | return _this;
27 | }
28 | TestUI.prototype.onBtnClick = function () {
29 | //手动控制组件属性
30 | this.radio.selectedIndex = 1;
31 | this.clip.index = 8;
32 | this.tab.selectedIndex = 2;
33 | this.combobox.selectedIndex = 0;
34 | this.check.selected = true;
35 | };
36 | TestUI.prototype.onBtn2Click = function () {
37 | //通过赋值可以简单快速修改组件属性
38 | //赋值有两种方式:
39 | //简单赋值,比如:progress:0.2,就是更改progress组件的value为2
40 | //复杂复制,可以通知某个属性,比如:label:{color:"#ff0000",text:"Hello LayaAir"}
41 | this.box.dataSource = { slider: 50, scroll: 80, progress: 0.2, input: "This is a input", label: { color: "#ff0000", text: "Hello LayaAir" } };
42 | //list赋值,先获得一个数据源数组
43 | var arr = [];
44 | for (var i = 0; i < 100; i++) {
45 | arr.push({ label: "item " + i, clip: i % 9 });
46 | }
47 | //给list赋值更改list的显示
48 | this.list.array = arr;
49 | //还可以自定义list渲染方式,可以打开下面注释看一下效果
50 | //list.renderHandler = new Handler(this, onListRender);
51 | };
52 | TestUI.prototype.onListRender = function (item, index) {
53 | //自定义list的渲染方式
54 | var label = item.getChildByName("label");
55 | if (index % 2) {
56 | label.color = "#ff0000";
57 | }
58 | else {
59 | label.color = "#000000";
60 | }
61 | };
62 | return TestUI;
63 | }(ui.test.TestPageUI));
64 | //程序入口
65 | Laya.init(600, 400, WebGL);
66 | //激活资源版本控制
67 | Laya.ResourceVersion.enable("version.json", Handler.create(null, beginLoad), Laya.ResourceVersion.FILENAME_VERSION);
68 | function beginLoad() {
69 | ApplicationFacade.I.startup(Laya.stage);
70 | }
71 | //# sourceMappingURL=LayaUISample.js.map
--------------------------------------------------------------------------------
/bin/js/framework/mvc/BaseMediator.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"BaseMediator.js","sourceRoot":"","sources":["../../../../src/framework/mvc/BaseMediator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH;;EAEE;AACF;IAA6C,gCAAgB;IAWzD,sBAAY,IAAY,EAAE,UAAyB;QAAnD,YACI,kBAAM,IAAI,EAAE,IAAI,CAAC,SAMpB;QAVD,gBAAgB;QACR,iBAAW,GAAY,KAAK,CAAC;QAIjC,KAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QAEvB,IAAI,UAAU,EAAE;YACZ,KAAI,CAAC,UAAU,GAAG,UAAU,CAAC;SAChC;;IACL,CAAC;IAEM,2BAAI,GAAX,UAAY,UAAyB;QACjC,IAAI,UAAU,EAAE;YACZ,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;SAChC;QACD,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;IAC3B,CAAC;IAQD;;;OAGG;IACI,gBAAG,GAAV;;QAAmD,cAAO;aAAP,UAAO,EAAP,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Q,CAAC,QAAa;IAC3B,OAAO,UAAC,MAAW,EAAE,YAAoB;QACrC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE;YACxC,GAAG,EAAE;gBACD,OAAO,iBAAiB,CAAC,CAAC,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC/D,CAAC;SACJ,CAAC,CAAC;IACP,CAAC,CAAA;AACL,CAAC"}
--------------------------------------------------------------------------------
/src/framework/mvc/org/puremvc/typescript/interfaces/INotification.ts:
--------------------------------------------------------------------------------
1 | module puremvc
2 | {
3 | /**
4 | * The interface definition for a PureMVC notification.
5 | *
6 | * PureMVC does not rely upon underlying event models such as the one provided in JavaScript DOM API,
7 | * and TypeScript does not have an inherent event model.
8 | *
9 | * The Observer pattern as implemented within PureMVC exists to support event-driven
10 | * communication between the application and the actors of the MVC triad (Model, View and
11 | * Controller).
12 | *
13 | * Notifications are not meant to be a replacement for Events in Javascript.
14 | * Generally, IMediator implementors place event listeners on their view components,
15 | * which they then handle in the usual way. This may lead to the broadcast of
16 | * INotifications to trigger ICommands or to communicate with other
17 | * IMediators. IProxy and ICommand instances communicate
18 | * with each other and IMediators by broadcasting INotifications.
19 | *
20 | * A key difference between JavaScript Events and PureMVC
21 | * INotifications is that Events follow the 'Chain of Responsibility'
22 | * pattern, 'bubbling' up the display hierarchy until some parent component handles the
23 | * Event, while PureMVC INotifications follow a 'Publish/Subscribe'
24 | * pattern. PureMVC classes need not be related to each other in a parent/child relationship in
25 | * order to communicate with one another using INotifications.
26 | */
27 | export interface INotification
28 | {
29 | /**
30 | * Get the name of the Notification instance.
31 | *
32 | * @return
33 | * The name of the Notification instance.
34 | */
35 | getName():string;
36 |
37 | /**
38 | * Set the body of the INotification.
39 | *
40 | * @param body
41 | * The body of the notification instance.
42 | */
43 | setBody( body:any ):void;
44 |
45 | /**
46 | * Get the body of the INotification.
47 | *
48 | * @return
49 | * The body object of the INotification.
50 | */
51 | getBody():any;
52 |
53 | /**
54 | * Set the type of the INotification.
55 | *
56 | * @param type
57 | * The type identifier for the notification.
58 | */
59 | setType( type:string ):void;
60 |
61 | /**
62 | * Get the type of the INotification.
63 | *
64 | * @return
65 | * The type of the INotification.
66 | */
67 | getType():string;
68 |
69 | /**
70 | * Get a textual representation of the Notification instance.
71 | *
72 | * @return
73 | * The textual representation of the Notification instance.
74 | */
75 | toString():string;
76 | }
77 | }
--------------------------------------------------------------------------------
/src/framework/manager/ticker/TickerManager.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sat Aug 03 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 |
23 | namespace yt {
24 | class TickerManager {
25 | private tickers: FrameTicker[] = [];
26 |
27 | public onFrame() {
28 | this.tickers.forEach((ticker, index, array) => {
29 | ticker.onFrame();
30 | if (ticker.isDisposed) {
31 | array.splice(index, 1);
32 | TickerPool.getInstance().reclaim(ticker);
33 | }
34 | });
35 | }
36 |
37 | public timer(interval: number, listener: Function, caller?: any) {
38 | this.addTicker(this.newTicker(interval, listener, caller));
39 | }
40 |
41 | public delay(delay: number, listener: Function, caller?: any) {
42 | this.addTicker(this.newTicker(delay, listener, caller, 1));
43 | }
44 |
45 | public clear(listener: Function, caller?: any) {
46 | this.tickers.forEach((ticker, index, array) => {
47 | if (ticker.listener === listener && ticker.caller === caller) {
48 | array.splice(index, 1);
49 | TickerPool.getInstance().reclaim(ticker);
50 | }
51 | });
52 | }
53 |
54 | private newTicker(interval: number, listener: Function, caller?: any, maxTick?: number): FrameTicker {
55 | let ticker = TickerPool.getInstance().get({ interval: interval, maxTick: maxTick });
56 | ticker.listener = listener;
57 | ticker.caller = caller || undefined;
58 | listener = caller ? listener.bind(caller) : listener;
59 | ticker.onTick.add((currentTimeSeconds: number, tickDeltaTimeSeconds: number, currentTick: number) => {
60 | listener();
61 | });
62 |
63 | return ticker;
64 | }
65 |
66 | private addTicker(ticker: FrameTicker) {
67 | ticker.resume();
68 | this.tickers.push(ticker);
69 | }
70 | }
71 |
72 | export const Ticker = new TickerManager();
73 | }
--------------------------------------------------------------------------------
/src/framework/network/HttpClient.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sat Aug 03 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 |
23 | namespace yt {
24 | export enum HttpResponseType {
25 | text,
26 | json,
27 | xml,
28 | arraybuffer
29 | }
30 |
31 | export class HttpClient {
32 | private http: Laya.HttpRequest;
33 | private options: HttpOptions;
34 | private headers: Array;
35 |
36 | constructor() {
37 | this.http = new Laya.HttpRequest();
38 | }
39 |
40 | public initialize(options: HttpOptions) {
41 | this.options = options;
42 | this.options.responseType = options.responseType || HttpResponseType.text;
43 | this.headers = [];
44 |
45 | if (options.headers) {
46 | for (let k in options.headers) {
47 | this.headers.push(k);
48 | this.headers.push(options.headers[k]);
49 | }
50 | }
51 | }
52 |
53 | public async get(data: any) {
54 | return this.send("get", data);
55 | }
56 |
57 | public async post(data: any) {
58 | return this.send("post", data);
59 | }
60 |
61 | private async send(method: string, data: any) {
62 | const opt = this.options;
63 | const responseType = HttpResponseType[opt.responseType];
64 |
65 | return new Promise((resolve, reject) => {
66 | this.http.once(Laya.Event.COMPLETE, this, err => resolve(this.http.data));
67 | this.http.once(Laya.Event.ERROR, this, err => reject(err));
68 | this.http.send(opt.url, data, method, responseType, this.headers);
69 | });
70 | }
71 | }
72 | }
--------------------------------------------------------------------------------
/src/framework/manager/sound/SoundManager.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sat Aug 03 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 |
23 | namespace yt {
24 | class SoundManager extends Singleton {
25 | /** 声音播放器 */
26 | private musicPlayer: BaseSoundPlayer = new MusicPlayer;
27 | private effectPlayer: BaseSoundPlayer = new EffectPlayer;
28 |
29 | private bgmUrl: string;
30 |
31 | /** 是否静音 */
32 | private soundMute: boolean = false;
33 | private musicMute: boolean = false;
34 |
35 | public setSoundMute(mute: boolean) {
36 | this.soundMute = mute;
37 |
38 | if (mute) {
39 | this.effectPlayer.stopSound();
40 | }
41 | }
42 |
43 | public setMusicMute(mute: boolean) {
44 | this.musicMute = mute;
45 |
46 | if (mute) {
47 | this.musicPlayer.stopSound();
48 | } else {
49 | this.musicPlayer.playSound(this.bgmUrl);
50 | }
51 | }
52 |
53 | public isSoundMute(): boolean {
54 | return this.soundMute;
55 | }
56 |
57 | public isMusicMute(): boolean {
58 | return this.musicMute;
59 | }
60 |
61 | playMusic(url: string) {
62 | this.bgmUrl = url;
63 |
64 | if (this.musicMute) {
65 | return;
66 | }
67 |
68 | this.musicPlayer.playSound(url);
69 | }
70 |
71 | playSound(url: string) {
72 | if (this.soundMute) {
73 | return;
74 | }
75 |
76 | this.effectPlayer.playSound(url);
77 | }
78 |
79 | }
80 |
81 | export const Sound = new SoundManager;
82 | }
83 |
--------------------------------------------------------------------------------
/bin/js/framework/presence/LocalPresence.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sat Aug 03 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 | var yt;
23 | (function (yt) {
24 | var LocalPresenceImpl = /** @class */ (function () {
25 | function LocalPresenceImpl() {
26 | this.data = {};
27 | }
28 | LocalPresenceImpl.prototype.set = function (key, value) {
29 | this.data[key] = value;
30 | try {
31 | if (typeof value === 'string') {
32 | Laya.LocalStorage.setItem(key, value);
33 | }
34 | else {
35 | Laya.LocalStorage.setJSON(key, value);
36 | }
37 | }
38 | catch (error) {
39 | console.error(error);
40 | }
41 | };
42 | LocalPresenceImpl.prototype.get = function (key) {
43 | if (!this.data[key]) {
44 | var str = Laya.LocalStorage.getItem(key);
45 | try {
46 | var obj = JSON.parse(str);
47 | if (obj && typeof obj == 'object') {
48 | this.data[key] = obj;
49 | }
50 | else {
51 | this.data[key] = str;
52 | }
53 | }
54 | catch (error) {
55 | this.data[key] = str;
56 | }
57 | }
58 | return this.data[key];
59 | };
60 | LocalPresenceImpl.prototype.del = function (key) {
61 | delete this.data[key];
62 | Laya.LocalStorage.removeItem(key);
63 | };
64 | return LocalPresenceImpl;
65 | }());
66 | yt.LocalPresence = new LocalPresenceImpl();
67 | })(yt || (yt = {}));
68 | //# sourceMappingURL=LocalPresence.js.map
--------------------------------------------------------------------------------
/bin/js/framework/pool/TickerPool.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sat Aug 03 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 | var __extends = (this && this.__extends) || (function () {
23 | var extendStatics = function (d, b) {
24 | extendStatics = Object.setPrototypeOf ||
25 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
27 | return extendStatics(d, b);
28 | };
29 | return function (d, b) {
30 | extendStatics(d, b);
31 | function __() { this.constructor = d; }
32 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33 | };
34 | })();
35 | var yt;
36 | (function (yt) {
37 | var TickerPool = /** @class */ (function (_super) {
38 | __extends(TickerPool, _super);
39 | function TickerPool() {
40 | var _this = _super.call(this) || this;
41 | _this.pool = yt.ObjectPool.create({
42 | name: "TickerPool",
43 | factory: _this.createTicker.bind(_this),
44 | initialize: _this.initTicker.bind(_this)
45 | });
46 | return _this;
47 | }
48 | TickerPool.prototype.createTicker = function () {
49 | return new FrameTicker();
50 | };
51 | TickerPool.prototype.initTicker = function (ticker, options) {
52 | ticker.initialize(options.interval, options.maxTick);
53 | };
54 | TickerPool.prototype.get = function (options) {
55 | return this.pool.get(options);
56 | };
57 | TickerPool.prototype.reclaim = function (ticker) {
58 | this.pool.reclaim(ticker);
59 | };
60 | return TickerPool;
61 | }(Singleton));
62 | yt.TickerPool = TickerPool;
63 | })(yt || (yt = {}));
64 | //# sourceMappingURL=TickerPool.js.map
--------------------------------------------------------------------------------
/bin/js/framework/pool/HttpClientPool.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sat Aug 03 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 | var __extends = (this && this.__extends) || (function () {
23 | var extendStatics = function (d, b) {
24 | extendStatics = Object.setPrototypeOf ||
25 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
27 | return extendStatics(d, b);
28 | };
29 | return function (d, b) {
30 | extendStatics(d, b);
31 | function __() { this.constructor = d; }
32 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33 | };
34 | })();
35 | var yt;
36 | (function (yt) {
37 | /**
38 | * http请求池
39 | */
40 | var HttpClientPool = /** @class */ (function (_super) {
41 | __extends(HttpClientPool, _super);
42 | function HttpClientPool() {
43 | var _this = _super.call(this) || this;
44 | _this.pool = yt.ObjectPool.create({
45 | name: "HttpClientPool",
46 | firstAllocationNumber: 1,
47 | factory: _this.createHttpClient.bind(_this),
48 | initialize: _this.initHttpClient.bind(_this)
49 | });
50 | return _this;
51 | }
52 | HttpClientPool.prototype.createHttpClient = function () {
53 | return new yt.HttpClient();
54 | };
55 | HttpClientPool.prototype.initHttpClient = function (client, options) {
56 | client.initialize(options);
57 | };
58 | HttpClientPool.get = function (options) {
59 | return HttpClientPool.getInstance().pool.get(options);
60 | };
61 | HttpClientPool.reclaim = function (client) {
62 | HttpClientPool.getInstance().pool.reclaim(client);
63 | };
64 | return HttpClientPool;
65 | }(Singleton));
66 | yt.HttpClientPool = HttpClientPool;
67 | })(yt || (yt = {}));
68 | //# sourceMappingURL=HttpClientPool.js.map
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/patterns/facade/Facade.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"Facade.js","sourceRoot":"","sources":["../../../../../../../../../src/framework/mvc/org/puremvc/typescript/patterns/facade/Facade.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,iFAAiF;AACjF,gFAAgF;AAChF,sFAAsF;AACtF,iFAAiF;AACjF,oFAAoF;AACpF,wFAAwF;AACxF,+EAA+E;AAC/E,0EAA0E;AAC1E,yEAAyE;AACzE,8FAA8F;AAE9F,IAAO,OAAO,CAuYb;AAvYD,WAAO,OAAO;IAEb,YAAY,CAAC;IAEb;;;;;;;;;;;;;;;;;OAiBG;IACH;QAwBC;;;;;;;;;WASG;QACH;YA/BA;;;;eAIG;YACH,UAAK,GAAU,IAAI,CAAC;YAEpB;;;;eAIG;YACH,SAAI,GAAS,IAAI,CAAC;YAElB;;;;eAIG;YACH,eAAU,GAAe,IAAI,CAAC;YAc7B,IAAI,MAAM,CAAC,QAAQ;gBAClB,MAAM,KAAK,CAAE,MAAM,CAAC,aAAa,CAAE,CAAC;YAErC,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC;YACvB,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACzB,CAAC;QAED;;;;;;;;;WASG;QACH,iCAAgB,GAAhB;YAEC,IAAI,CAAC,eAAe,EAAE,CAAC;YACvB,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAC5B,IAAI,CAAC,cAAc,EAAE,CAAC;QACvB,CAAC;QAED;;;;;;;;;;;;;;;;;;;;;;WAsBG;QACH,gCAAe,GAAf;YAEC,IAAI,CAAC,IAAI,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AI,CAAE,CAAE,CAAC;QAC9D,CAAC;QAeD;;;;;WAKG;QACI,kBAAW,GAAlB;YAEC,IAAI,CAAC,MAAM,CAAC,QAAQ;gBACnB,MAAM,CAAC,QAAQ,GAAG,IAAI,MAAM,EAAE,CAAC;YAEhC,OAAO,MAAM,CAAC,QAAQ,CAAC;QACxB,CAAC;QAzBD;;;WAGG;QACI,oBAAa,GAAU,uCAAuC,CAAC;QAsBvE,aAAC;KAAA,AAhXD,IAgXC;IAhXY,cAAM,SAgXlB,CAAA;AACF,CAAC,EAvYM,OAAO,KAAP,OAAO,QAuYb"}
--------------------------------------------------------------------------------
/src/framework/mvc/org/puremvc/typescript/interfaces/IController.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | module puremvc
4 | {
5 | /**
6 | * The interface definition for a PureMVC Controller.
7 | *
8 | * In PureMVC, an IController implementor follows the 'Command and Controller'
9 | * strategy, and assumes these responsibilities:
10 | *
11 | * - Remembering which
ICommands are intended to handle which
12 | * INotifications.
13 | * - Registering itself as an
IObserver with the View for each
14 | * INotification that it has an ICommand mapping for.
15 | * - Creating a new instance of the proper
ICommand to handle a given
16 | * INotification when notified by the View.
17 | * - Calling the
ICommand's execute method, passing in the
18 | * INotification.
19 | *
20 | * Your application must register ICommands with the Controller.
21 | *
22 | * The simplest way is to subclass Facade, and use its
23 | * initializeController method to add your registrations.
24 | */
25 | export interface IController
26 | {
27 | /**
28 | * If an ICommand has previously been registered to handle the given
29 | * INotification, then it is executed.
30 | *
31 | * @param notification
32 | * The INotification the command will receive as parameter.
33 | */
34 | executeCommand( notification:INotification ):void;
35 |
36 | /**
37 | * Register a particular ICommand class as the handler for a particular
38 | * INotification.
39 | *
40 | * If an ICommand has already been registered to handle
41 | * INotifications with this name, it is no longer used, the new
42 | * ICommand is used instead.
43 | *
44 | * The Observer for the new ICommand is only created if this the
45 | * first time an ICommand has been registered for this
46 | * Notification name.
47 | *
48 | * @param notificationName
49 | * The name of the INotification.
50 | *
51 | * @param commandClassRef
52 | * The constructor of the ICommand implementor.
53 | */
54 | registerCommand( notificationName:string, commandClassRef:Function ):void;
55 |
56 | /**
57 | * Check if an ICommand is registered for a given Notification.
58 | *
59 | * @param notificationName
60 | * Name of the Notification to check wheter an ICommand is
61 | * registered for.
62 | *
63 | * @return
64 | * An ICommand is currently registered for the given
65 | * notificationName.
66 | */
67 | hasCommand( notificationName:string ):bool;
68 |
69 | /**
70 | * Remove a previously registered ICommand to INotification
71 | * mapping.
72 | *
73 | * @param notificationName
74 | * The name of the INotification to remove the ICommand
75 | * mapping for.
76 | */
77 | removeCommand( notificationName:string ):void;
78 | }
79 | }
--------------------------------------------------------------------------------
/src/ui/layaUI.max.all.ts:
--------------------------------------------------------------------------------
1 |
2 | import View=laya.ui.View;
3 | import Dialog=laya.ui.Dialog;
4 | module ui.test {
5 | export class TestPageUI extends View {
6 | public btn:laya.ui.Button;
7 | public clip:laya.ui.Clip;
8 | public combobox:laya.ui.ComboBox;
9 | public tab:laya.ui.Tab;
10 | public list:laya.ui.List;
11 | public btn2:laya.ui.Button;
12 | public check:laya.ui.CheckBox;
13 | public radio:laya.ui.RadioGroup;
14 | public box:laya.ui.Box;
15 |
16 | public static uiView:any ={"type":"View","child":[{"props":{"x":0,"y":0,"skin":"comp/bg.png","sizeGrid":"30,4,4,4","width":600,"height":400},"type":"Image"},{"props":{"x":41,"y":56,"skin":"comp/button.png","label":"点我赋值","width":150,"height":37,"sizeGrid":"4,4,4,4","var":"btn"},"type":"Button"},{"props":{"x":401,"y":56,"skin":"comp/clip_num.png","clipX":10,"var":"clip"},"type":"Clip"},{"props":{"x":220,"y":143,"skin":"comp/combobox.png","labels":"select1,select2,selecte3","selectedIndex":1,"sizeGrid":"4,20,4,4","width":200,"height":23,"var":"combobox"},"type":"ComboBox"},{"props":{"x":220,"y":96,"skin":"comp/tab.png","labels":"tab1,tab2,tab3","var":"tab"},"type":"Tab"},{"props":{"x":259,"y":223,"skin":"comp/vscroll.png","height":150},"type":"VScrollBar"},{"props":{"x":224,"y":223,"skin":"comp/vslider.png","height":150},"type":"VSlider"},{"type":"List","child":[{"type":"Box","child":[{"props":{"skin":"comp/label.png","text":"this is a list","x":26,"y":5,"width":78,"height":20,"fontSize":14,"name":"label"},"type":"Label"},{"props":{"x":0,"y":2,"skin":"comp/clip_num.png","clipX":10,"name":"clip"},"type":"Clip"}],"props":{"name":"render","x":0,"y":0,"width":112,"height":30}}],"props":{"x":452,"y":68,"width":128,"height":299,"vScrollBarSkin":"comp/vscroll.png","repeatX":1,"var":"list"}},{"props":{"x":563,"y":4,"skin":"comp/btn_close.png","name":"close"},"type":"Button"},{"props":{"x":41,"y":112,"skin":"comp/button.png","label":"点我赋值","width":150,"height":66,"sizeGrid":"4,4,4,4","labelSize":30,"labelBold":true,"var":"btn2"},"type":"Button"},{"props":{"x":220,"y":188,"skin":"comp/checkbox.png","label":"checkBox1","var":"check"},"type":"CheckBox"},{"props":{"x":220,"y":61,"skin":"comp/radiogroup.png","labels":"radio1,radio2,radio3","label2'":"","var":"radio"},"type":"RadioGroup"},{"type":"Panel","child":[{"props":{"skin":"comp/image.png"},"type":"Image"}],"props":{"x":299,"y":223,"width":127,"height":150,"vScrollBarSkin":"comp/vscroll.png"}},{"props":{"x":326,"y":188,"skin":"comp/checkbox.png","label":"checkBox2","labelColors":"#ff0000"},"type":"CheckBox"},{"type":"Box","child":[{"props":{"y":70,"skin":"comp/progress.png","width":150,"height":14,"sizeGrid":"4,4,4,4","name":"progress"},"type":"ProgressBar"},{"props":{"y":103,"skin":"comp/label.png","text":"This is a Label","width":137,"height":26,"fontSize":20,"name":"label"},"type":"Label"},{"props":{"y":148,"skin":"comp/textinput.png","text":"textinput","width":150,"name":"input"},"type":"TextInput"},{"props":{"skin":"comp/hslider.png","width":150,"name":"slider"},"type":"HSlider"},{"props":{"y":34,"skin":"comp/hscroll.png","width":150,"name":"scroll"},"type":"HScrollBar"}],"props":{"x":41,"y":197,"var":"box"}}],"props":{"width":600,"height":400}};
17 | constructor(){ super()}
18 | createChildren():void {
19 |
20 | super.createChildren();
21 | this.createView(ui.test.TestPageUI.uiView);
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/bin/js/framework/manager/ticker/TickerManager.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sat Aug 03 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 | var yt;
23 | (function (yt) {
24 | var TickerManager = /** @class */ (function () {
25 | function TickerManager() {
26 | this.tickers = [];
27 | }
28 | TickerManager.prototype.onFrame = function () {
29 | this.tickers.forEach(function (ticker, index, array) {
30 | ticker.onFrame();
31 | if (ticker.isDisposed) {
32 | array.splice(index, 1);
33 | yt.TickerPool.getInstance().reclaim(ticker);
34 | }
35 | });
36 | };
37 | TickerManager.prototype.timer = function (interval, listener, caller) {
38 | this.addTicker(this.newTicker(interval, listener, caller));
39 | };
40 | TickerManager.prototype.delay = function (delay, listener, caller) {
41 | this.addTicker(this.newTicker(delay, listener, caller, 1));
42 | };
43 | TickerManager.prototype.clear = function (listener, caller) {
44 | this.tickers.forEach(function (ticker, index, array) {
45 | if (ticker.listener === listener && ticker.caller === caller) {
46 | array.splice(index, 1);
47 | yt.TickerPool.getInstance().reclaim(ticker);
48 | }
49 | });
50 | };
51 | TickerManager.prototype.newTicker = function (interval, listener, caller, maxTick) {
52 | var ticker = yt.TickerPool.getInstance().get({ interval: interval, maxTick: maxTick });
53 | ticker.listener = listener;
54 | ticker.caller = caller || undefined;
55 | listener = caller ? listener.bind(caller) : listener;
56 | ticker.onTick.add(function (currentTimeSeconds, tickDeltaTimeSeconds, currentTick) {
57 | listener();
58 | });
59 | return ticker;
60 | };
61 | TickerManager.prototype.addTicker = function (ticker) {
62 | ticker.resume();
63 | this.tickers.push(ticker);
64 | };
65 | return TickerManager;
66 | }());
67 | yt.Ticker = new TickerManager();
68 | })(yt || (yt = {}));
69 | //# sourceMappingURL=TickerManager.js.map
--------------------------------------------------------------------------------
/bin/js/framework/mvc/org/puremvc/typescript/core/View.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"View.js","sourceRoot":"","sources":["../../../../../../../../src/framework/mvc/org/puremvc/typescript/core/View.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,iFAAiF;AACjF,qFAAqF;AACrF,iFAAiF;AAEjF,IAAO,OAAO,CA+Rb;AA/RD,WAAO,OAAO;IAEb,YAAY,CAAC;IAEb;;;;;;;;;;;;;;;;;OAiBG;IACH;QAiBC;;;;;;;WAOG;QACH;YAtBA;;;;eAIG;YACH,gBAAW,GAAU,IAAI,CAAC;YAE1B;;;;eAIG;YACH,gBAAW,GAAU,IAAI,CAAC;YAYzB,IAAI,IAAI,CAAC,QAAQ;gBAChB,MAAM,KAAK,CAAE,IAAI,CAAC,aAAa,CAAE,CAAC;YAEnC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;YAC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escript/patterns/proxy/Proxy.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | ///
5 |
6 | module puremvc
7 | {
8 | "use strict";
9 |
10 | /**
11 | * A base IProxy implementation.
12 | *
13 | * In PureMVC, IProxy implementors assume these responsibilities:
14 | *
15 | * - Implement a common method which returns the name of the Proxy.
16 | *
- Provide methods for setting and getting the data object.
17 | *
18 | * Additionally,
IProxys typically:
19 | *
20 | * - Maintain references to one or more pieces of model data.
21 | *
- Provide methods for manipulating that data.
22 | *
- Generate
INotifications when their model data changes.
23 | * - Expose their name as a
constant called NAME, if they are not
24 | * instantiated multiple times.
25 | * - Encapsulate interaction with local or remote services used to fetch and persist model
26 | * data.
27 | */
28 | export class Proxy
29 | extends Notifier
30 | implements IProxy, INotifier
31 | {
32 | /**
33 | * The data object controlled by the
Proxy.
34 | *
35 | * @protected
36 | */
37 | proxyName:string = null;
38 |
39 | /**
40 | * The name of the Proxy.
41 | *
42 | * @protected
43 | */
44 | data:any = null;
45 |
46 | /**
47 | * Constructs a Proxy instance.
48 | *
49 | * @param proxyName
50 | * The name of the Proxy instance.
51 | *
52 | * @param data
53 | * An initial data object to be held by the Proxy.
54 | */
55 | constructor( proxyName:string=null, data:any=null )
56 | {
57 | super();
58 |
59 | this.proxyName = (proxyName != null) ? proxyName : Proxy.NAME;
60 |
61 | if( data != null )
62 | this.setData(data);
63 | }
64 |
65 | /**
66 | * Get the name of the Proxy> instance.
67 | *
68 | * @return
69 | * The name of the Proxy> instance.
70 | */
71 | getProxyName():string
72 | {
73 | return this.proxyName;
74 | }
75 |
76 | /**
77 | * Set the data of the Proxy> instance.
78 | *
79 | * @param data
80 | * The data to set for the Proxy> instance.
81 | */
82 | setData( data:any ):void
83 | {
84 | this.data = data;
85 | }
86 |
87 | /**
88 | * Get the data of the Proxy> instance.
89 | *
90 | * @return
91 | * The data held in the Proxy instance.
92 | */
93 | getData():any
94 | {
95 | return this.data;
96 | }
97 |
98 | /**
99 | * Called by the Model when the Proxy is registered. This method has to be
100 | * overridden by the subclass to know when the instance is registered.
101 | */
102 | onRegister():void
103 | {
104 |
105 | }
106 |
107 | /**
108 | * Called by the Model when the Proxy is removed. This method has to be
109 | * overridden by the subclass to know when the instance is removed.
110 | */
111 | onRemove():void
112 | {
113 |
114 | }
115 |
116 | /**
117 | * The default name of the Proxy
118 | *
119 | * @type
120 | * @constant
121 | */
122 | static NAME:string = "Proxy";
123 | }
124 | }
--------------------------------------------------------------------------------
/bin/js/framework/manager/sound/SoundManager.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Created at Sat Aug 03 2019 by clh
3 | * Contact <395942144@qq.com>
4 | *
5 | * The MIT License (MIT)
6 | * Copyright (c) 2019 clh
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
12 | * subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial
15 | * portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
18 | * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | */
22 | var __extends = (this && this.__extends) || (function () {
23 | var extendStatics = function (d, b) {
24 | extendStatics = Object.setPrototypeOf ||
25 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
27 | return extendStatics(d, b);
28 | };
29 | return function (d, b) {
30 | extendStatics(d, b);
31 | function __() { this.constructor = d; }
32 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33 | };
34 | })();
35 | var yt;
36 | (function (yt) {
37 | var SoundManager = /** @class */ (function (_super) {
38 | __extends(SoundManager, _super);
39 | function SoundManager() {
40 | var _this = _super !== null && _super.apply(this, arguments) || this;
41 | /** 声音播放器 */
42 | _this.musicPlayer = new yt.MusicPlayer;
43 | _this.effectPlayer = new yt.EffectPlayer;
44 | /** 是否静音 */
45 | _this.soundMute = false;
46 | _this.musicMute = false;
47 | return _this;
48 | }
49 | SoundManager.prototype.setSoundMute = function (mute) {
50 | this.soundMute = mute;
51 | if (mute) {
52 | this.effectPlayer.stopSound();
53 | }
54 | };
55 | SoundManager.prototype.setMusicMute = function (mute) {
56 | this.musicMute = mute;
57 | if (mute) {
58 | this.musicPlayer.stopSound();
59 | }
60 | else {
61 | this.musicPlayer.playSound(this.bgmUrl);
62 | }
63 | };
64 | SoundManager.prototype.isSoundMute = function () {
65 | return this.soundMute;
66 | };
67 | SoundManager.prototype.isMusicMute = function () {
68 | return this.musicMute;
69 | };
70 | SoundManager.prototype.playMusic = function (url) {
71 | this.bgmUrl = url;
72 | if (this.musicMute) {
73 | return;
74 | }
75 | this.musicPlayer.playSound(url);
76 | };
77 | SoundManager.prototype.playSound = function (url) {
78 | if (this.soundMute) {
79 | return;
80 | }
81 | this.effectPlayer.playSound(url);
82 | };
83 | return SoundManager;
84 | }(Singleton));
85 | yt.Sound = new SoundManager;
86 | })(yt || (yt = {}));
87 | //# sourceMappingURL=SoundManager.js.map
--------------------------------------------------------------------------------
/bin/libs/laya.d3Plugin.js:
--------------------------------------------------------------------------------
1 |
2 | (function(window,document,Laya){
3 | var __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;
4 |
5 | var Component3D=laya.d3.component.Component3D,ComponentNode=laya.d3.core.ComponentNode,MeshTerrainSprite3D=laya.d3.core.MeshTerrainSprite3D;
6 | var Sprite3D=laya.d3.core.Sprite3D;
7 | /**
8 | *PathFinding 类用于创建寻路。
9 | */
10 | //class laya.d3.component.PathFind extends laya.d3.component.Component3D
11 | var PathFind=(function(_super){
12 | function PathFind(){
13 | /**@private */
14 | this._meshTerrainSprite3D=null;
15 | /**@private */
16 | this._finder=null;
17 | /**@private */
18 | this._setting=null;
19 | /**寻路网格。*/
20 | this.grid=null;
21 | PathFind.__super.call(this);
22 | }
23 |
24 | __class(PathFind,'laya.d3.component.PathFind',_super);
25 | var __proto=PathFind.prototype;
26 | /**
27 | *@private
28 | *初始化载入蒙皮动画组件。
29 | *@param owner 所属精灵对象。
30 | */
31 | __proto._load=function(owner){
32 | if (! (owner instanceof laya.d3.core.MeshTerrainSprite3D ))
33 | throw new Error("PathFinding: The owner must MeshTerrainSprite3D!");
34 | _super.prototype._load.call(this,owner);
35 | this._meshTerrainSprite3D=owner;
36 | }
37 |
38 | /**
39 | *寻找路径。
40 | *@param startX 开始X。
41 | *@param startZ 开始Z。
42 | *@param endX 结束X。
43 | *@param endZ 结束Z。
44 | *@return 路径。
45 | */
46 | __proto.findPath=function(startX,startZ,endX,endZ){
47 | var minX=this._meshTerrainSprite3D.minX;
48 | var minZ=this._meshTerrainSprite3D.minZ;
49 | var cellX=this._meshTerrainSprite3D.width / this.grid.width;
50 | var cellZ=this._meshTerrainSprite3D.depth / this.grid.height;
51 | var halfCellX=cellX / 2;
52 | var halfCellZ=cellZ / 2;
53 | var gridStartX=Math.floor((startX-minX)/ cellX);
54 | var gridStartZ=Math.floor((startZ-minZ)/ cellZ);
55 | var gridEndX=Math.floor((endX-minX)/ cellX);
56 | var gridEndZ=Math.floor((endZ-minZ)/ cellZ);
57 | var boundWidth=this.grid.width-1;
58 | var boundHeight=this.grid.height-1;
59 | (gridStartX > boundWidth)&& (gridStartX=boundWidth);
60 | (gridStartZ > boundHeight)&& (gridStartZ=boundHeight);
61 | (gridStartX < 0)&& (gridStartX=0);
62 | (gridStartZ < 0)&& (gridStartZ=0);
63 | (gridEndX > boundWidth)&& (gridEndX=boundWidth);
64 | (gridEndZ > boundHeight)&& (gridEndZ=boundHeight);
65 | (gridEndX < 0)&& (gridEndX=0);
66 | (gridEndZ < 0)&& (gridEndZ=0);
67 | var path=this._finder.findPath(gridStartX,gridStartZ,gridEndX,gridEndZ,this.grid);
68 | this.grid.reset();
69 | for (var i=1;i < path.length-1;i++){
70 | var gridPos=path[i];
71 | gridPos[0]=gridPos[0] *cellX+halfCellX+minX;
72 | gridPos[1]=gridPos[1] *cellZ+halfCellZ+minZ;
73 | }
74 | if (path.length==1){
75 | path[0][0]=endX;
76 | path[0][1]=endX;
77 | }else if (path.length > 1){
78 | path[0][0]=startX;
79 | path[0][1]=startZ;
80 | path[path.length-1][0]=endX;
81 | path[path.length-1][1]=endZ;
82 | }
83 | return path;
84 | }
85 |
86 | /**
87 | *设置寻路设置。
88 | *@param value 寻路设置。
89 | */
90 | /**
91 | *获取寻路设置。
92 | *@return 寻路设置。
93 | */
94 | __getset(0,__proto,'setting',function(){
95 | return this._setting;
96 | },function(value){
97 | (value)&& (this._finder=new PathFinding.finders.AStarFinder(value));
98 | this._setting=value;
99 | });
100 |
101 | return PathFind;
102 | })(Component3D)
103 |
104 |
105 |
106 | })(window,document,Laya);
107 |
108 | if (typeof define === 'function' && define.amd){
109 | define('laya.core', ['require', "exports"], function(require, exports) {
110 | 'use strict';
111 | Object.defineProperty(exports, '__esModule', { value: true });
112 | for (var i in Laya) {
113 | var o = Laya[i];
114 | o && o.__isclass && (exports[i] = o);
115 | }
116 | });
117 | }
--------------------------------------------------------------------------------
/src/framework/mvc/org/puremvc/typescript/interfaces/IMediator.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | module puremvc
5 | {
6 | /**
7 | * The interface definition for a PureMVC Mediator.
8 | *
9 | * In PureMVC, IMediator implementors assume these responsibilities:
10 | *
11 | * - Implement a common method which returns a list of all
INotifications
12 | * the IMediator has interest in.
13 | * - Implement a notification callback method.
14 | *
- Implement methods that are called when the IMediator is registered or removed from the View.
15 | *
16 | * Additionally,
IMediators typically:
17 | *
18 | * - Act as an intermediary between one or more view components such as text boxes or
19 | * list controls, maintaining references and coordinating their behavior.
20 | *
- In a PureMVC application, this the place where event listeners are added to view
21 | * components, and their handlers implemented.
22 | *
- Respond to and generate
INotifications, interacting with of the rest of the
23 | * PureMVC application.
24 | *
25 | * When an IMediator is registered with the IView,
26 | * the IView will call the IMediator's
27 | * listNotificationInterests method. The IMediator will
28 | * return a list of INotification names which
29 | * it wishes to be notified about.
30 | *
31 | * The IView will then create an Observer object
32 | * encapsulating that IMediator's (handleNotification) method
33 | * and register it as an Observer for each INotification name returned by
34 | * listNotificationInterests.
35 | */
36 | export interface IMediator
37 | extends INotifier
38 | {
39 | /**
40 | * Get the IMediator instance name
41 | *
42 | * @return
43 | * The IMediator instance name
44 | */
45 | getMediatorName():string;
46 |
47 | /**
48 | * Get the Mediator's view component.
49 | *
50 | * Additionally, an implicit getter will usually be defined in the subclass that casts the
51 | * view object to a type, like this:
52 | *
53 | *
54 | * getMenu: function
55 | * {
56 | * return this.viewComponent;
57 | * }
58 | *
59 | *
60 | * @return
61 | * The Mediator's view component.
62 | */
63 | getViewComponent():any;
64 |
65 | /**
66 | * Set the IMediator's view component.
67 | *
68 | * @param viewComponent
69 | * The default view component to set for this Mediator.
70 | */
71 | setViewComponent( viewComponent:any ):void;
72 |
73 | /**
74 | * List the INotification names this IMediator is interested in
75 | * being notified of.
76 | *
77 | * @return
78 | * The list of notifications names in which is interested the Mediator.
79 | */
80 | listNotificationInterests( ):string[];
81 |
82 | /**
83 | * Handle INotifications.
84 | *
85 | *
86 | * Typically this will be handled in a switch statement, with one 'case' entry per
87 | * INotification the Mediator is interested in.
88 | *
89 | * @param notification
90 | * The notification instance to be handled.
91 | */
92 | handleNotification( notification:INotification ):void;
93 |
94 | /**
95 | * Called by the View when the Mediator is registered. This method has to be overridden
96 | * by the subclass to know when the instance is registered.
97 | */
98 | onRegister():void;
99 |
100 | /**
101 | * Called by the View when the Mediator is removed. This method has to be overridden
102 | * by the subclass to know when the instance is removed.
103 | */
104 | onRemove():void;
105 | }
106 | }
--------------------------------------------------------------------------------
/src/framework/mvc/org/puremvc/typescript/patterns/mediator/Mediator.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 |
6 | module puremvc
7 | {
8 | "use strict";
9 |
10 | /**
11 | * A base IMediator implementation.
12 | *
13 | * Typically, a Mediator will be written to serve one specific control or group
14 | * controls and so, will not have a need to be dynamically named.
15 | */
16 | export class Mediator
17 | extends Notifier
18 | implements IMediator, INotifier
19 | {
20 | /**
21 | * The name of the Mediator.
22 | *
23 | * @protected
24 | */
25 | mediatorName:string = null;
26 |
27 | /**
28 | * The Mediator's view component.
29 | *
30 | * @protected
31 | */
32 | viewComponent:any = null;
33 |
34 | /**
35 | * Constructs a Mediator instance.
36 | *
37 | * @param mediatorName
38 | * The name of the Mediator.
39 | *
40 | * @param viewComponent
41 | * The view component handled by this Mediator.
42 | */
43 | constructor( mediatorName:string=null, viewComponent:any=null )
44 | {
45 | super();
46 |
47 | this.mediatorName = (mediatorName != null) ? mediatorName : Mediator.NAME;
48 | this.viewComponent = viewComponent;
49 | }
50 |
51 | /**
52 | * Get the Mediator instance name.
53 | *
54 | * @return
55 | * The Mediator instance name
56 | */
57 | getMediatorName():string
58 | {
59 | return this.mediatorName;
60 | }
61 |
62 | /**
63 | * Get the Mediator's view component.
64 | *
65 | * Additionally, an implicit getter will usually be defined in the subclass that casts the
66 | * view object to a type, like this:
67 | *
68 | *
69 | * getMenu():Menu
70 | * {
71 | * return
74 | *
75 | * @return
76 | * The Mediator's default view component.
77 | */
78 | getViewComponent():any
79 | {
80 | return this.viewComponent;
81 | }
82 |
83 | /**
84 | * Set the IMediator's view component.
85 | *
86 | * @param viewComponent
87 | * The default view component to set for this Mediator.
88 | */
89 | setViewComponent( viewComponent:any ):void
90 | {
91 | this.viewComponent = viewComponent;
92 | }
93 |
94 | /**
95 | * List the INotification names this IMediator is interested in
96 | * being notified of.
97 | *
98 | * @return
99 | * The list of notifications names in which is interested the Mediator.
100 | */
101 | listNotificationInterests():string[]
102 | {
103 | return new Array();
104 | }
105 |
106 | /**
107 | * Handle INotifications.
108 | *
109 | *
110 | * Typically this will be handled in a switch statement, with one 'case' entry per
111 | * INotification the Mediator is interested in.
112 | *
113 | * @param notification
114 | * The notification instance to be handled.
115 | */
116 | handleNotification( notification:INotification ):void
117 | {
118 |
119 | }
120 |
121 | /**
122 | * Called by the View when the Mediator is registered. This method has to be overridden
123 | * by the subclass to know when the instance is registered.
124 | */
125 | onRegister():void
126 | {
127 |
128 | }
129 |
130 | /**
131 | * Called by the View when the Mediator is removed. This method has to be overridden
132 | * by the subclass to know when the instance is removed.
133 | */
134 | onRemove():void
135 | {
136 |
137 | }
138 |
139 | /**
140 | * Default name of the Mediator.
141 | *
142 | * @constant
143 | */
144 | static NAME:string = 'Mediator';
145 | }
146 | }
--------------------------------------------------------------------------------