大约有 3,990 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0072 秒)
Laya_社区(2836) Laya2.0_文档(369) Laya2.0_api(225) laya_api(169) Laya_示例(157) Laya2.0_示例(117) Laya3.0_api(62) Laya3.0_文档(55)
...isionActive', this.onCollision); private onCollision(event): void { for(var i = 0; i < event.pairs.length; i++) { var pair = event.pairs[i]; if(pair.bodyA.label === 'gun' && pair.bodyB.label == "gameover") { this.onGameOver(); } } } private onGameOver(): void { console.log("...
来源: Laya_社区 发布时间: 20180524
...gth 动画最后一帧的索引值, */ function aniUrls(aniName,length){ var urls = []; for(var i = 0;i<length;i++){ //动画资源路径要和动画图集打包前的资源命名对应起来 urls.push("role/"+aniName+i+".png"); } return urls; } ``` 代码运行效果如动图9所示,只播放...
来源: Laya2.0_文档 发布时间: 20210715
...gl.WebGL; public class UI_ScrollBar { /***垂直滚动条资源**/ private var skins:Array=["../../../../res/ui/vscroll.png", "../../../../res/ui/vscroll$bar.png", "../../../../res/ui/vscroll$down.png", "../../../../res/ui/vscroll$up.png"]; /***提示信息文本框**/ private var promptText:Text; /...
来源: Laya2.0_文档 发布时间: 20210715
...gl.WebGL; public class UI_ScrollBar { /***水平滚动条资源**/ private var skins:Array=["../../../../res/ui/hscroll.png", "../../../../res/ui/hscroll$bar.png", "../../../../res/ui/hscroll$down.png", "../../../../res/ui/hscroll$up.png"]; /***提示信息文本框**/ private var promptText:Text; /...
来源: Laya2.0_文档 发布时间: 20210714
...代码是将单独的画布绘制到舞台的示例,你可以参考下:var htmlCanvas:HTMLCanvas = HTMLCanvas.create(HTMLCanvas.TYPE2D); htmlCanvas.source.width = 100; htmlCanvas.source.height = 100; htmlCanvas.size(100, 100); // 在单独的画布上绘制矩形。 htmlCanvas.getContext("2d").f...
来源: Laya_社区 发布时间: 20161020
...dBox):void[override] SphereShapeProperty DetailemitFromShellpropertypublic var emitFromShell:Boolean从外壳发射。radiusproperty public var radius:Number发射器半径。Constructor DetailSphereShape()Constructorpublic function SphereShape() 创建一个 SphereShape 实例。 Method Detail_get...
来源: laya_api 发布时间: 20170929
...nyazhi 赞同来自: get angularVelocity() { if (this._btColliderObject) { var phtqua = this._btColliderObject.angularVelocity; this._angularVelocity.setValue(phtqua.x, phtqua.y, phtqua.z); } return this._angularVelocity; } get totalForce() { if (this._btColliderObject) { var btTotalForce = this.btC...
来源: Laya_社区 发布时间: 20200619
...dBox):void[override] SphereShapeProperty DetailemitFromShellpropertypublic var emitFromShell:Boolean从外壳发射。radiusproperty public var radius:Number发射器半径。Constructor DetailSphereShape()Constructorpublic function SphereShape() 创建一个 SphereShape 实例。 Method Detail_get...
来源: Laya2.0_api 发布时间: 20190513
...指向是 ?? contact.getHitInfo = function () { var manifold = new this.box2d.b2WorldManifold(); this.GetWorldManifold(manifold); var p = manifold.points[0]; p.x *= Physics.PIXEL_RATIO; ...
来源: Laya_社区 发布时间: 20220819
...GL; public class TTFTest { public function TTFTest() { Laya.init(550,400); var sp:Image=new Image(); sp.loadImage("2.png"); Laya.stage.addChild(sp); var text:Text=new Text(); text.fontSize=40; text.color="#FF00FF"; text.text="哈哈哈哈哈哈哈哈哈哈哈哈哈哈"; text.font="hu" text.pos(600,6...
来源: Laya_社区 发布时间: 20160514