大约有 492 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0042 秒)
...tends Laya.Script { private progressBar: Laya.ProgressBar; constructor() { super(); } onAwake(): void { // 加载进度条资源,图片资源来自“引擎API使用示例” Laya.loader.load(["resources/res/ui/progressBar.png", "resources/res/ui/progressBar$bar.png"]).then(() => { // 创建进...
来源: Laya3.0_文档 发布时间: 20251010
...createView调用代码么? 就像这样子: createChildren():void { super.createChildren(); this.createView(Laya.loader.getRes("test/TestPage.json")); this.loadUI("test/TestPage"); } 2. 在编辑器生成代码的时候怎么添加自定义的操作? 比如我想同时生成一...
来源: Laya_社区 发布时间: 20171229
...aya.WebGL; var Handler = Laya.Handler function GolfMainUI() { GolfMainUI.super(this) var dragRegion; showDragRegion(); this.golfBall.x = Laya.stage.width / 2; this.golfBall.y = Laya.stage.height / 2; this.golfBall.on(Event.MOUSE_DOWN, this, onStartDrag) function showDragRegion() { //拖动限...
来源: Laya_社区 发布时间: 20180627
...laya.net.Loader; class TestUI extends ui.test.TestPageUI { constructor() { super(); var btn1=new ui.test.view_btnUI(); var btn1_btn:laya.ui.Button=btn1.getChildByName("btn") as laya.ui.Button; //问题一: 这里为什么获取不到子node呢?打印显示btn1_btn为null console.log(btn1_btn); /...
来源: Laya_社区 发布时间: 20170725
... var x = 0; export default class Scene extends Laya.Sprite{ constructor(){ super(); Laya.init(500, 300, Laya.WebGL); var bg = new Laya.Sprite(); bg.loadImage("comp/hunter.jpg"); this.addChild(bg); Laya.timer.frameLoop(1,this,this.move); // drawSomething(); } move() { sp = new Laya.Sprite(); Laya.sta...
来源: Laya_社区 发布时间: 20190520
...9553 赞同来自: 多谢分享 2017-11-25 0 0 分享 微博 QZONE 微信 6super 赞同来自: 版主您好!我最近也在学用AS语言做飞机大战,看了您的代码,优点是:可以几个方向键一起用,但是,如果按下一个方向不放开的话,人物的移动会一直...
来源: Laya_社区 发布时间: 20171125
...ends Laya.Image{ isShow:boolean = false; name:string = ""; constructor() { super(); } loadImageAndPos(name:string,posX:number,posY:number):void { this.name = name; this.anchorX = 0; this.anchorY = 0; this.x = posX; //这里是256*整数倍的叠加 每张图片都是256*256大小的地图块 this....
来源: Laya_社区 发布时间: 20190315
...; // private _img: Image = null; private _lb:Label = null; constructor() { super(); this._lb = new Label(); this._lb.size(ListDataSourceItem.WID, ListDataSourceItem.HEI); this.addChild(this._lb); // this._img = new Image(); // this._img.size(ListDataSourceItem.WID, ListDataSourceItem.HEI); // this.a...
来源: Laya_社区 发布时间: 20180410
...r = 5; private assets: any[]; private dialog: Laya.Dialog; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { this.assets = ["resources/res/ui/dialog (1).png", "resources/res/ui/close.png"]; Laya.l...
来源: Laya3.0_文档 发布时间: 20230303
...s GameLayer extends ui.GameLayerUI { private infos : any; constructor () { super (); this.infos = { rotation : 0 }; Laya.timer.frameLoop(1,this,()=> { this.infos.rotation += 1; if (this.infos.rotation >= 360) this.infos.rotation -= 360; this.IM_TURNTABLE.rotation = this.infos.rotation; this.VI...
来源: Laya_社区 发布时间: 20180720