大约有 3,979 项符合查询结果, 库内数据总量为 30,906 项。 (搜索耗时: 0.0071 秒)
Laya_社区(2827) Laya2.0_文档(369) Laya2.0_api(225) laya_api(169) Laya_示例(157) Laya2.0_示例(117) Laya3.0_api(62) Laya3.0_文档(53)
...,代码://初始化LayaAIR环境 Laya.init(1000, 800); //创建精灵 var sp:Sprite = new Sprite(); //创建渐变 var gradient=Browser.context.createLinearGradient(0,0,80,0); gradient.addColorStop(0,"white"); gradient.addColorStop(1,"red"); sp.graphics.drawRect(0, 0, 150, 150, gradient); sp.gra...
来源: Laya_社区 发布时间: 20160725
...注释 AS3中下面的一个简单的数据类 public class Demo { public var a:int; public var b:String; public function Demo() { } }通过编译后会变成下面的代码class Demo{ constructor (){ //this.a=0; //this.b=null; } }这里字段a和b在编译后会被注释掉,只有初始化的时...
来源: Laya_社区 发布时间: 20210222
...liang.png"; //地址 this.img2 = "../laya/assets/comp/haoyuobang-hui.png"; var img = new Laya.Sprite(); //实例 img.width = 300; //宽高 img.height = 200; switchImg(); img.on(Laya.Event.CLICK, this, switchImg) //点击事件 Laya.stage.addChild(img); function switchImg() { img.graphics.clear(); //...
来源: Laya_社区 发布时间: 20180502
...MoveRockerPosX = undefined; this.ctrlMoveRockerPosY = undefined; var tX, tY; var ts = e.touches; console.log(e.stageX + ":" + e.stageY); if(ts) { console.log("11111111111111111111"); } else { console.log("33333333333333333333333"); }...
来源: Laya_社区 发布时间: 20171204
...字体名称“layabox”使用关联字体。 function registerFont() { var assetFontData = conch.readFileFromAsset('font/layabox.ttf', 'raw'); if (assetFontData) { if (conch.registerFont("layabox", assetFontData)) { log('字体注册成功'); } else { log('字体注册失败'); } } } 4.2 方法二...
来源: Laya3.0_文档 发布时间: 20250103
...res/atlas/test0.png", Handler.create(this, function():void { var t:Texture = Laya.loader.getRes("res/atlas/test0.png"); ape = new Sprite(); var matrix:Matrix = new Matrix(); matrix.a = -1; matrix.tx = 2*100+ t.width; ape.graphics.drawTexture(t,10...
来源: Laya_社区 发布时间: 20170221
...ate(this,onLoaded),null,Loader.JSON); } private function onLoaded():void { var json:JSON=Laya.loader.getRes("unpack.json"); var str:String=JSON.stringify(json); trace(str); } } } 2017-08-07 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的...
来源: Laya_社区 发布时间: 20170807
... 请帮忙看看我的错误在哪里?谢谢大家 对话框的对象 var SelectColorDialog = (function () { function selectColorDialog() { SelectColorDialog.super(this); this.name = 'SelectColorDialog'; this.x = 1013; } Laya.class(selectColorDialog, "SelectColorDialog", testUI); return selectC...
来源: Laya_社区 发布时间: 20180326
绘制梯形 出错问题~ var path:Array=[["moveTo", 0, 0], //画笔移到A点 ["lineTo", lineW, 0], //画到B点 ["lineTo", dingBianW + (lineW - dingBianW) / 2, -_totalH / Math.sin((90 - Math.abs(skewXNum)) / 180 * Math.PI)], //再画到C点 ["lineTo", (lineW - dingBianW) / 2, -_totalH / Math.s...
来源: Laya_社区 发布时间: 20180717
...=PhysicsWorld_Character)) ```typescript //为精灵添加角色控制器 var character:CharacterController = monkey.addComponent(CharacterController); //创建胶囊碰撞器 var sphereShape:CapsuleColliderShape = new CapsuleColliderShape(1.0, 3.4); //设置Shape的本地偏移 sphereShape.localOf...
来源: Laya2.0_文档 发布时间: 20210715