HNGameManager.js 942 B

1234567891011121314151617181920212223242526272829
  1. import GameManagerBase from 'GameManagerBase'
  2. import GameConstant from 'GameConstant'
  3. import HNScenceManager from 'HNScenceManager'
  4. module.exports = ( function () {
  5. var HNGameManager = GameManagerBase.Instance();
  6. var ScenceManager = HNScenceManager.Instance();
  7. HNGameManager.CreateGame = function (wKindID) {
  8. return ScenceManager.CreateGame(wKindID);
  9. };
  10. HNGameManager.loadGameBaseData = function (wKindID) {
  11. var callBack = function(gameNode){
  12. HNGameManager.CreateKernel();
  13. }
  14. ScenceManager.loadGameBaseData(wKindID, callBack);
  15. };
  16. HNGameManager.startXZDDRecord = function (recordData, wKindID) {
  17. var self = this;
  18. var callBack = function(gameNode){
  19. var pKernelSink = self.CreateGame(wKindID);
  20. pKernelSink.KindID = wKindID;
  21. pKernelSink.startRecord(recordData);
  22. }
  23. };
  24. return HNGameManager;
  25. })()