大约有 401 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0081 秒)
...{ 'use strict'; function DEB(str){ console.debug("[res]"+str); } class MiniFileMgr { static isLocalNativeFile(url) { for (var i = 0, sz = MiniAdpter.nativefiles.length; i < sz; i++) { if (url.indexOf(MiniAdpter.nativefiles[i]) != -1) return true; } return false; } static getFileInfo(fil...
来源: Laya_社区 发布时间: 20200103
...unction onStartDrag(e) { this.startDrag(dragRegion, true, 100); } } Laya.class(GolfMainUI, "GolfMainUI", GolfMainPageUI); //初始化DEBUG //初始化微信小游戏 Laya.MiniAdpter.init(); //程序入口 Laya.init(500,800, WebGL); Laya.stage.scaleModel = "full"; // DebugTool.init() //激活...
来源: Laya_社区 发布时间: 20180627
...bel; import Handler = laya.utils.Handler; import Loader = 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...
来源: Laya_社区 发布时间: 20170725
...次累加的同时清空上次的路径 var sp; 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...
来源: Laya_社区 发布时间: 20190520
...。需要添加如下的示例代码,实现脚本控制Tab: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Tab }) public tab: Laya.Tab; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只...
来源: Laya3.0_文档 发布时间: 20251010
...位是没错,而且都是整数的移动地图的。 export default class MapSprite extends 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...
来源: Laya_社区 发布时间: 20190315
...要添加如下的示例代码,实现脚本控制ComboBox: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.ComboBox }) public combobox: Laya.ComboBox; //组件被激活后执行,此时所有节点和组件均已创建完毕...
来源: Laya3.0_文档 发布时间: 20251010
...动图8) 3、代码创建Dialog组件 代码运行结果: const { regClass, property } = Laya; @regClass() export class UI_Dialog extends Laya.Script { private DIALOG_WIDTH: number = 220; private DIALOG_HEIGHT: number = 275; private CLOSE_BTN_WIDTH: number = 43; private CLOSE_BTN_PADDING: number...
来源: Laya3.0_文档 发布时间: 20230303
...一直旋转。有将mask拿掉测试,发现就不会有类似问题。class 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.inf...
来源: Laya_社区 发布时间: 20180720
...要添加如下的示例代码,实现脚本控制CheckBox: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.CheckBox }) public checkbox: Laya.CheckBox; //组件被激活后执行,此时所有节点和组件均已创建完毕...
来源: Laya3.0_文档 发布时间: 20251010