Procházet zdrojové kódy

Add Ninja Supplies

Michael Tang před 3 roky
rodič
revize
b638b7363a
1 změnil soubory, kde provedl 12 přidání a 0 odebrání
  1. 12 0
      02-yellow/03-04-ninja-supplies.js

+ 12 - 0
02-yellow/03-04-ninja-supplies.js

@@ -0,0 +1,12 @@
+//Multiple toggle effects and mouse click events 
+//so game could be buggy
+
+//Sword Object - Mouse Button Up Event
+if ($this.isTouching(ninja)) { 
+    $this.remove(); // remove the original sword 
+    star.toggleDraggable(); // make the star draggable 
+    swordIcon.toggleVisible(); // makes the sword icon visible 
+} else { 
+    // otherwise, return sword to pile. 
+    $this.x(672); $this.y(314); 
+}