Open lcnvdl opened 8 years ago
Hi! I'm using jsface for the new objects of my project, but I have a lot of "legacy objects", like:
var Robot = function() { this.getRotation = function() { return 0; } };
I'm trying to create a child of Robot using jsface, like:
var RobotChild = Class(Robot, function() { return { }; });
But, when I do:
var robot = new RobotChild();
I get an empty instance.
Regards
What do you mean you get an empty instance? I run the snippet, robot does have properties:
typeof robot; // "object" typeof robot.getRotation; // "function" robot.getRotation(); // 0
Hi! I'm using jsface for the new objects of my project, but I have a lot of "legacy objects", like:
I'm trying to create a child of Robot using jsface, like:
But, when I do:
I get an empty instance.
Regards