difenduandada
2024-12-31 34abe6963b344c882358274957f4b992456fee40
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
"use strict";
cc._RF.push(module, '395efSzHtdCHZloLl2NV/QN', 'worldmap_controller');
// Scripts/mod/worldmap/worldmap_controller.js
 
"use strict";
 
// --------------------------------------------------------------------
// @author: xxx@syg.com(必填, 创建模块的人员)
// @description:
//      这里填写详细说明,主要填写该模块的功能简要
// <br/>Create: 2019-03-27 17:31:58
// --------------------------------------------------------------------
var WorldmapController = cc.Class({
  "extends": BaseController,
  ctor: function ctor() {},
  // 初始化配置数据
  initConfig: function initConfig() {
    var WorldmapModel = require("worldmap_model");
 
    this.model = new WorldmapModel();
    this.model.initConfig();
  },
  // 返回当前的model
  getModel: function getModel() {
    return this.model;
  },
  // 注册监听事件
  registerEvents: function registerEvents() {},
  // 注册协议接受事件
  registerProtocals: function registerProtocals() {// this.RegisterProtocal(1110, this.on1110);
  },
  // 打开世界地图主界面
  openWorldMapMainWindow: function openWorldMapMainWindow(status, data) {
    if (status == false) {
      if (this.worldmap_window != null) {
        this.worldmap_window.close();
        this.worldmap_window = null;
      }
    } else {
      if (this.worldmap_window == null) {
        this.worldmap_window = Utils.createClass("worldmap_main_window", this);
      }
 
      if (this.worldmap_window && this.worldmap_window.isOpen() == false) {
        this.worldmap_window.open(data);
      }
    }
  },
  __delete: function __delete() {
    if (this.model != null) {
      this.model.DeleteMe();
      this.model = null;
    }
  }
});
module.exports = WorldmapController;
 
cc._RF.pop();