[0]发布微信小游戏,sprite的graphics.drawPoly安卓平台会引起花屏
发布微信小游戏,sprite的graphics.drawPoly安卓平台会引起花屏
做了两个进度条,一个是用sprite做的,一个是用fairygui的进度条组件做的,当进度条的value值第二次以上为0的时候,微信小游戏平台,安卓手机( 目前公司所有的安卓手机都会花屏,例如:oneplus 8pro android12 )fairygui的进度条周边花屏了,做法是设置bar的填充方法为水平,直接用sprire做的没有花屏,参考了fairygui里面的代码,都是用的graphics.drawPoly, 麻烦官方看一下这个问题,demo和ui工程在附件里面
做了两个进度条,一个是用sprite做的,一个是用fairygui的进度条组件做的,当进度条的value值第二次以上为0的时候,微信小游戏平台,安卓手机( 目前公司所有的安卓手机都会花屏,例如:oneplus 8pro android12 )fairygui的进度条周边花屏了,做法是设置bar的填充方法为水平,直接用sprire做的没有花屏,参考了fairygui里面的代码,都是用的graphics.drawPoly, 麻烦官方看一下这个问题,demo和ui工程在附件里面
要回复问题请先登录
2 个回复
小高
赞同来自:
zkang5
赞同来自:
主要就是让进度条等于0
var w: number = 642;
var h: number = 12;
var g: Laya.Graphics = this._mask.graphics;
g.clear();
if (w == 0 || h == 0)
return;
var points: any[] = [];
points.push(0, h);
points.push(0, 0);
points.push(this._index, 0);
points.push(this._index, h);
// points.push(0, h);
g.drawPoly(0, 0, points, "#FFFFFF");
this._fguiPro.value = Math.floor(this._index / w * 100);
this._index += 8; //移动到这里
if (this._index >= 642)
{
this._index = 0;
}