大约有 488 项符合查询结果, 库内数据总量为 30,902 项。 (搜索耗时: 0.0042 秒)
...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
...lRotationTest extends Laya.Sprite{ constructor(displayContainerClass:any){ super(); // var panel:Laya.Panel = new Laya.Panel(); //panel 有问题 // var panel:Laya.Sprite = new Laya.Sprite(); //sprite 无问题 var panel = new displayContainerClass(); panel.graphics.drawRect(0,0,200,200,"#ffffff"); ...
来源: Laya_社区 发布时间: 20170814
...laya.events.Event; // 创建TestPageUI的子类 function TestUI() { TestUI.super(this); //list赋值,先获得一个数据源数组 var arr = ; for (var i = 0; i < 100; i++) { arr.push({label: "item " + i, clip: i % 9,btn:"btn"+i}); } //给list赋值更改list的显示 this.list.array = arr; //...
来源: Laya_社区 发布时间: 20170513