Difference between revisions of "Radish"
From CodeStuff
| Line 22: | Line 22: | ||
makeBackground(); | makeBackground(); | ||
| + | var ty=100; | ||
var tx=10; | var tx=10; | ||
var dx=1; | var dx=1; | ||
| Line 30: | Line 31: | ||
if (tx>600) dx=-1; | if (tx>600) dx=-1; | ||
if (tx<30) dx=1; | if (tx<30) dx=1; | ||
| + | if (keyIsDown(38)) ty-=3; | ||
| + | if (keyIsDown(40)) ty+=3; | ||
| + | |||
| + | |||
} | } | ||
| Line 35: | Line 40: | ||
clear(); | clear(); | ||
setColour("Black"); | setColour("Black"); | ||
| − | drawImage(test,tx, | + | drawImage(test,tx,ty) |
| + | print(JSON.stringify(getMousePosition()),30,200); | ||
} | } | ||
run(move,draw); | run(move,draw); | ||
| − | |||
| − | |||
</edcode> | </edcode> | ||
Revision as of 00:08, 24 January 2012
Testing Image use.
Should also have some animation.
Seems to suck a huge deal more CPU on Firefox than Chrome. Timing still not 100% but at least better than it was.