task AnyDraw(let p_circle,let l,let t,let r,let b,let x,let y,let alp,let red,let green,let blue,let scale){
yield;
LoadGraphic(p_circle);
loop{
let obj = Obj_Create(OBJ_EFFECT);
ObjEffect_SetTexture(obj, p_circle);
ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
ObjEffect_CreateVertex(obj, 4);
ObjEffect_SetLayer(obj, 8);
let wh = [l,t,r,b];
let xy = Cal_XY(wh[0], wh[1], wh[2], wh[3]);
let uv = Cal_UV(wh[0], wh[1], wh[2], wh[3]);
ascent (i in 0..4) {
ObjEffect_SetVertexXY(obj, i, xy[i], xy[i + 4]);
ObjEffect_SetVertexUV(obj, i, uv[i], uv[i + 4]);
}
Obj_SetPosition(obj, x, y);
ascent (i in 0..4) {
ObjEffect_SetVertexColor(obj,i,alp,red,green,blue);
}
ObjEffect_SetScale(obj,scale,scale);
wait(1800);//30昩侦1夞彂偒捈偟
Obj_Delete(obj);
}
}
用处什么的...自己钻研吧
yield;
LoadGraphic(p_circle);
loop{
let obj = Obj_Create(OBJ_EFFECT);
ObjEffect_SetTexture(obj, p_circle);
ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
ObjEffect_CreateVertex(obj, 4);
ObjEffect_SetLayer(obj, 8);
let wh = [l,t,r,b];
let xy = Cal_XY(wh[0], wh[1], wh[2], wh[3]);
let uv = Cal_UV(wh[0], wh[1], wh[2], wh[3]);
ascent (i in 0..4) {
ObjEffect_SetVertexXY(obj, i, xy[i], xy[i + 4]);
ObjEffect_SetVertexUV(obj, i, uv[i], uv[i + 4]);
}
Obj_SetPosition(obj, x, y);
ascent (i in 0..4) {
ObjEffect_SetVertexColor(obj,i,alp,red,green,blue);
}
ObjEffect_SetScale(obj,scale,scale);
wait(1800);//30昩侦1夞彂偒捈偟
Obj_Delete(obj);
}
}
用处什么的...自己钻研吧