if($this.isTouching(ninja)){ message.z(10); message.text("You reached the exit with " + ninja.coins + " coins") ninja.remove(); }
if ($this.isTouching(stairs)){ $this.remove(); } $this.incrementAnimation(); if ($this.isTouching(ninja)){ ninja.coins += 1; $this.remove(); }