我想每次更新物体位置时画一条线指示出来,但是调用clear方法后,drawDebugLine再次进来之后线段绘制不了啦。
这个设计就是这样的吗?有没有其他办法来实现呢?谢谢
drawDebugLine(from, to) {
const paint = this.paint
paint.clear()
paint.moveTo(from)
paint.lineTo(to)
paint.stroke()
},
我想每次更新物体位置时画一条线指示出来,但是调用clear方法后,drawDebugLine再次进来之后线段绘制不了啦。
这个设计就是这样的吗?有没有其他办法来实现呢?谢谢
drawDebugLine(from, to) {
const paint = this.paint
paint.clear()
paint.moveTo(from)
paint.lineTo(to)
paint.stroke()
},
谢谢~
该主题在最后一个回复创建后14天后自动关闭。不再允许新的回复。