• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 615 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0041 秒)

101. toFixed(0)函数是什么作用? [ 76%]

...用,并没有缓存资源 var text = new Laya.Text();为什么text.pivot(200,200);不起作用 构造函数不能进断点 问题状态 最新活动: 2018-03-26 18:27 浏览: 900 关注: 2 人

来源: Laya_社区 发布时间: 20180326

102. 图片如何切割 AS3 [ 76%]

...hics.save();//必须要调用 否则报错  img.graphics.clipRect(100,100,200,200);  img.graphics.drawTexture(t);  img.graphics.restore();  this.addChild(img); 2019-01-11 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 Laya07 相关...

来源: Laya_社区 发布时间: 20190111

103. 如何旋转2d的物理系统的矩形 [ 76%]

...ll_TL); Wall_TL.graphics.drawRect(0, 0, 400, 32, "#ffff00"); Wall_TL.pivot(200, 16);   var Collision_Wall_TL:any = Matter.Bodies.rectangle(200, 400, 400, 32, { layaSprite:Wall_TL,isStatic: true })  Matter.World.add(this.engine.world, [ Collision_Wall_TL, // Collision_Wall_R, // Collision_Wall_TL ]...

来源: Laya_社区 发布时间: 20180529

104. laya.sprite 不接受click事件 [ 75%]

.../image/0.jpg'); //this._firstSprite.scale(0.3,0.3); this._firstSprite.size(200,200); //this._firstSprite.pivotX = 0;//设置 sprite 对象的水平方法轴心点坐标。 //this._firstSprite.pivotY = 0;//设置 sprite 对象的垂直方法轴心点坐标。 //this._firstSprite.mouseEnabled = true; ...

来源: Laya_社区 发布时间: 20200801

105. Event触发不了 [ 75%]

...btn:Sprite = new Sprite(); login.addChild(btn); btn.graphics.drawRect(100, 200, 50, 50, "#000"); btn.pos(100, 200); btn.size(50,50); btn.on(Event.MOUSE_DOWN, this, function():void {console.log(1);}); btn.on换成Laya.stage.on是可以触发的,但是btn却触发不了。 麻烦解答,谢谢。 2...

来源: Laya_社区 发布时间: 20170525

106. layabox支持rgba颜色吗 [ 75%]

... varsp:Sprite=new Sprite(); sp.graphics.save(); sp.graphics.drawRect(0,0,200,200,"#FF0000"); sp.graphics.alpha=0.4; sp.graphics.restore(); Laya.stage.addChild(sp); 2017-02-16 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 tody 相关问...

来源: Laya_社区 发布时间: 20170215

107. 关于当前焦点的问题 [ 75%]

...textInput = new TextInput(); textInput.bgColor = "#ffcccc"; textInput.size(200,200); Laya.stage.addChild(textInput); textInput.name = "aa"; textInput.on(Event.FOCUS,this,onFoucs); private function onFoucs(e:Event):void { trace(e); } 2017-10-26 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个...

来源: Laya_社区 发布时间: 20171026

108. 关于Laya.loader.load和getRes的问题 [ 75%]

...rite(); ape.graphics.drawTexture(t,0,0); Laya.stage.addChild(ape); ape.pos(200, 0); })); 这可以正常运行,但是我把外面的 load 函数去掉,将第二个参数中的函数内容独立后却不能显示图片:var t:Texture = Laya.loader.getRes("../../../../res/apes/monkey2.png"); var...

来源: Laya_社区 发布时间: 20170804

109. 关于timeline结束的问题 [ 75%]

...d.alpha = 0; timeline .addLabel('lightDotted', 0) .to(child, { alpha: 1 }, 200, Ease.linearIn) .to(child, { alpha: 0 }, 200, Ease.linearIn) } } timeline.play(0, true); timeline.on(Event.COMPLETE, this, function () { count++; if (count === 2) { timeline.destroy(); count = 0; } });为什么在结束...

来源: Laya_社区 发布时间: 20170405

110. 缓动-简单的Tween [ 75%]

...age.bgColor = "#232628"; setup(); })(); function setup() { var terminalX = 200; var characterA = createCharacter("../../res/cartoonCharacters/1.png"); characterA.pivot(46.5, 50); characterA.y = 100; var characterB = createCharacter("../../res/cartoonCharacters/2.png"); characterB.pivot(34, 50); char...

来源: Laya_示例 发布时间: 20240930