Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added draw switch helper object

  • Loading branch information...
commit 19ed6cab1e0273fc35d57de4f21438c5366f6a4f 1 parent 946f3a2
Dhaivat Pandya authored April 15, 2012

Showing 1 changed file with 14 additions and 0 deletions. Show diff stats Hide diff stats

  1. 14  hydroxide.js
14  hydroxide.js
@@ -447,3 +447,17 @@ var OHWallBouncingObj = (function() {
447 447
 })();
448 448
 
449 449
 
  450
+/* adds a draw swtich; if you don't want to draw the object anymore, just set this.draw to false */
  451
+var OHDrawSwitchObj = (function() {
  452
+	var obj = Object.create(OHDrawSwitchObj);
  453
+	
  454
+	obj.drawSwitch = true;
  455
+
  456
+	obj.draw = function() {
  457
+		if(obj.drawSwitch) {
  458
+			return;
  459
+		}
  460
+
  461
+			obj.drawSwitchOn();
  462
+	};
  463
+})();

0 notes on commit 19ed6ca

Please sign in to comment.
Something went wrong with that request. Please try again.