你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
输入关键字进行搜索
搜索:
没有找到相关结果
q1402907210 - 你猜猜
赞同来自: Yangcy
a573859380
赞同来自:
135*****574
Barry Allen
import Sprite = Laya.Sprite export default class Test extends Sprite{ public DEF_SIZE: number = 200 public CIRCLE_WIDTH: number = 20 public $circleSprite: Sprite = new Sprite() public startY: number = -90 constructor() { super() this._init() } private _init() { this.cacheAs = "bitmap" this.size(this.DEF_SIZE,this.DEF_SIZE) this.pos(200,200) this.cacheAs = "bitmap" this.graphics.drawPie(this.DEF_SIZE >> 1, this.DEF_SIZE >> 1, this.DEF_SIZE >> 1,-90,this.startY,'#ff0000') this.$circleSprite.blendMode = "destination-out" this.$circleSprite.pos(this.CIRCLE_WIDTH >> 1,this.CIRCLE_WIDTH >> 1) this.$circleSprite.graphics.clear() this.$circleSprite.graphics.drawCircle((this.DEF_SIZE - this.CIRCLE_WIDTH) >> 1, (this.DEF_SIZE - this.CIRCLE_WIDTH) >> 1, (this.DEF_SIZE - 20) >> 1, "#fff") this.addChild(this.$circleSprite) this.start() } public start() { this.timerLoop(2, this, this.draw) } public draw() { if (this.startY >= 270) { this.clearTimer(this, this.draw) } this.startY++ this.graphics.clear() this.graphics.drawPie(this.DEF_SIZE >> 1, this.DEF_SIZE >> 1, this.DEF_SIZE >> 1,-90,this.startY,'#ff0000') } } Laya.stage.addChild(new Test())
要回复问题请先登录
6 个回复
q1402907210 - 你猜猜
赞同来自: Yangcy
a573859380
赞同来自:
a573859380
赞同来自:
135*****574
赞同来自:
Barry Allen
赞同来自:
Barry Allen
赞同来自: