Permalink
Browse files

Added draw switch helper object

  • Loading branch information...
1 parent 946f3a2 commit 19ed6cab1e0273fc35d57de4f21438c5366f6a4f @Poincare committed Apr 15, 2012
Showing with 14 additions and 0 deletions.
  1. +14 −0 hydroxide.js
View
@@ -447,3 +447,17 @@ var OHWallBouncingObj = (function() {
})();
+/* adds a draw swtich; if you don't want to draw the object anymore, just set this.draw to false */
+var OHDrawSwitchObj = (function() {
+ var obj = Object.create(OHDrawSwitchObj);
+
+ obj.drawSwitch = true;
+
+ obj.draw = function() {
+ if(obj.drawSwitch) {
+ return;
+ }
+
+ obj.drawSwitchOn();
+ };
+})();

0 comments on commit 19ed6ca

Please sign in to comment.