Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

orbit spell in the wizard game

View orbit.js
1 2 3 4 5 6 7 8 9 10 11 12
self.say(' ')
self.move(self.whatDist('wizard:f91e'))
var phi = 0
 
self.think(function () {
var d = self.whatDist('wizard:f91e')
self.move({x:d.x+Math.cos(phi*Math.PI)*150,y:d.y+Math.sin(phi*Math.PI)*150})
self.say(round(phi) + 'π', { fill : 'white', color : 'purple' })
phi += 0.1
})
 
function round (n) { return Math.round(n*1000)/1000 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.