Prototype of Game.map is not Map
-
Tested it with
Game.map.constructor === Map
returns falseI avoid this error by
Game.map.proto = Map.prototype;
-
There is no need in
Mapprototype, becauseGame.mapobject is a singleton. You can extend it directly, there are no other instances ofMap.
-
Haha, can't understand that with my object orientated mind. I develop by just adjusting the prototype of your classes and creating ne "classes"

- a C++ dev -