Closed jessegreenberg closed 9 years ago
My initial rationale for creating setPincersOpen
in the constructor was that there will only be 4 instances of RoboticArmNode in the sim, so there is minimal size penalty for adding it in the constructor. And by adding it in the constructor, there were 4 fields (nodes) that could be kept private. But I can see how this is confusing, so I've moved it to the prototype.
Back to @jessegreenberg for review.
I see, that makes sense. This looks great though, thanks! Closing.
The setPincersOpen() function in RoboticArmNode is declared as a public function inside the RoboticArmNode constructor. Should setPincersOpen() be added to the prototype through the inherit call?