BryceMehring / Hexel

Retro Tower Defense Game
https://brycemehring.github.io/projects/hexel/
MIT License
5 stars 2 forks source link

Map editor crash during save #19

Closed BryceMehring closed 9 years ago

BryceMehring commented 9 years ago

If the user clicks the save state button within the map editor, an error is generated because MapEditor.serializeGrid(...) is being called as a static function and as a method in different locations.

Transforming the map editor into a regular class instead of a singleton would solve this issue. This issue is mainly derived from the behavior of buildUI(...) because it must know of its parent.

Kioljin commented 9 years ago

This bug was introduced when guiUtilities was changed from using "parentObj.serializeGrid(saveFile)" to "parentObj:serializeGrid(saveFile) ". If we wish serializeGrid to be called using the colon instead of the period we should change the mapEditor syntax as well. For the time being this change to a colon has been reverted.