楼主方法
var itemId=null,itemHookY=null,r=0
function useItem(x,y,z,itemid,blockid){
itemId=itemid;itemHookY=y;
for(i=360;i>0;i--){drawCircle(x,z,r,i);}}
function procCmd(cmd){r=cmd;}
function drawCircle(a,b,dis,pit){
var setBlockX=a+(Math.round(dis*Math.cos(pit)));
var setBlockY=b+(Math.round(dis*Math.sin(pit)));
setTile(setBlockX,itemHookY,setBlockY,itemId);}
实在感觉麻烦…
var itemId=null,itemHookY=null,r=0
function useItem(x,y,z,itemid,blockid){
itemId=itemid;itemHookY=y;
for(i=360;i>0;i--){drawCircle(x,z,r,i);}}
function procCmd(cmd){r=cmd;}
function drawCircle(a,b,dis,pit){
var setBlockX=a+(Math.round(dis*Math.cos(pit)));
var setBlockY=b+(Math.round(dis*Math.sin(pit)));
setTile(setBlockX,itemHookY,setBlockY,itemId);}
实在感觉麻烦…