You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 rivejä
533 B

  1. local MapEditor = class("MapEditor")
  2. function MapEditor:ctor()
  3. end
  4. function MapEditor:init()
  5. -- 创建障碍块和地图可见范围
  6. self.ObstacleNode = app.editor.Map:createObstacleNode();
  7. app.mainLayer:addChild(self.ObstacleNode);
  8. -- 创建菱形网格
  9. self.GridNode = app.editor.Map:createGridNode();
  10. app.mainLayer:addChild(self.GridNode);
  11. end
  12. -- 关闭光效
  13. function MapEditor:close()
  14. -- 移除glNode
  15. self.GridNode:removeFromParent();
  16. -- 移除障碍块
  17. self.ObstacleNode:removeFromParent();
  18. end
  19. return MapEditor;