大约有 2,789 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0072 秒)
Laya_社区(1162) Laya3.0_api(543) Laya2.0_api(297) laya_api(221) Laya2.0_文档(201) Laya_示例(139) Laya3.0_文档(117) Laya2.0_示例(109)
...); } private function onClick():void { //HTMLCanvas 是 Html Canvas 的代理类,封装了 Canvas 的属性和方法。。请不要直接使用 new HTMLCanvas! //此处将canvas指定区域进行...
来源: Laya_社区 发布时间: 20170424
...提供的代码 微信主域代码: Laya.timer.once(400,this,function():void{ var rankTexture:Texture = new Texture(Browser.window.sharedCanvas); rankTexture.bitmap.alwaysChange = true;//小游戏使用,非常费,每帧刷新 rankSprite2.graphics.drawTexture(rankTexture,5,78,rankTexture.width,...
来源: Laya_社区 发布时间: 20180504
...ne { public txt_hello:Laya.Label; constructor(){ super()} createChildren():void { super.createChildren(); this.loadScene("CustomScene"); } } REG("ui.CustomSceneUI",CustomSceneUI); } 创建runtime类 如果想方便的引用导出类的组件,应该为界面绑定runtime类。如果不使用,C...
来源: Laya_社区 发布时间: 20200827
...import { com} from "../libs/protobuf/area.js"; export function testProto():void { console.log("call testProto"); var ProtobufUtil = com.bee.protobuf; let msg = ProtobufUtil.ProtoArea.create(); let buffer = ProtobufUtil.ProtoArea.encode(msg).finish(); let decode = ProtobufUtil.ProtoArea.decode(buffer...
来源: Laya_社区 发布时间: 20171115
...reate(this, this.loadGame)); } private loadGame(): void { var resArray = [ { url: "res/atlas/lobby/create_room.atlas", type: Laya.Loader.ATLAS }, ....... ]; ...
来源: Laya_社区 发布时间: 20181213
...hild(text); Laya.timer.once(1000,this,onLoop); } private function onLoop():void { var text:Text=new Text(); text.fontSize=40; text.color="#FF00FF"; text.text="嘻嘻嘻嘻嘻"; text.font="hu" Laya.stage.addChild(text); } } } 注意: 首次用到的(哈)字将会报废,下次再用到同...
来源: Laya_社区 发布时间: 20160514
...reate(this, this.loadGame)); } private loadGame(): void { var resArray = [ { url: "res/atlas/lobby/create_room.atlas", type: Laya.Loader.ATLAS }, ....... ]; ...
来源: Laya_社区 发布时间: 20181202
...age.screenMode = "vertical"; showScreen(); } private function showScreen():void { //图片 var img:Image = new Image(); img.centerX = 0; img.centerY = -70; img.skin = "res/monkey2.png"; Laya.stage.addChild(img); //文字 var text:Label = new Label(); text.text = "游戏的水平方向"; text.color =...
来源: Laya2.0_文档 发布时间: 20210714
...der.ATLAS}],Laya.Handler.create(this,this.loadComp)); } private loadComp():void{ var parent:ui.ParentViewUI = new ui.ParentViewUI(); Laya.stage.addChild(parent); //当注释掉设置rotaion的代码则没有问题,否则会导致显示异常,其他child消失 parent.child_1.rotation = Math.random(...
来源: Laya_社区 发布时间: 20170829
...g,hp:Number,speed:Number,hitRadius:Number,camp:Number,heroType:Number = 0):void { //初始化属性 this.type = type; this.hp = hp; this.speed = speed; this.hitRadius = hitRadius; this.camp = camp; this.heroType = heroType; if(!Role.cacheAs) { Role.cacheAs = true; //缓存飞机飞行动画 Animatio...
来源: Laya_社区 发布时间: 20170420