/** The ninja can change objects colors by using the isTouching and toggleDraggable functions. This is similar to the first Color Change activity but with additional functionality. The player should not be able to drag the circles once they have made the rectangle change color. hex codes not needed for this game, $this.fill() returns the current color yellow - #FEFD06 green - #43C318 red - #DE2121 blue - #186EC3 purple - #9608AF */ //***********************button1 Object: Mouse Button Up Event********************// if($this.isTouching(rectangle)) { rectangle.fill($this.fill()); $this.x(166); $this.y(440); $this.toggleDraggable(); } //***********************button2 Object: Mouse Button Up Event********************// if($this.isTouching(rectangle)) { rectangle.fill($this.fill()); $this.x(292); $this.y(440); $this.toggleDraggable(); } //***********************button3 Object: Mouse Button Up Event*******************// if($this.isTouching(rectangle)) { rectangle.fill($this.fill()); $this.x(420); $this.y(440); $this.toggleDraggable(); } //***********************button4 Object: Mouse Button Up Event*******************// if($this.isTouching(rectangle)) { rectangle.fill($this.fill()); $this.x(550); $this.y(440); $this.toggleDraggable(); } //***********************button5 Object: Mouse Button Up Event*******************// if($this.isTouching(rectangle)) { rectangle.fill($this.fill()); $this.x(684); $this.y(440); $this.toggleDraggable(); }