大约有 1,232 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0051 秒)
Laya_社区(702) Laya_示例(137) Laya2.0_文档(123) Laya2.0_示例(116) Laya3.0_文档(75) Laya3.0_api(39) laya_api(29) Laya2.0_api(11)
websocket请教下,服务器发送过来的数据怎么获取 private openHandler(event: any = null): void { console.log(`平台 正确建立连接`); this.socket.send("getScore"); } private receiveHandler(msg: any = null,data): void { console.log(`接收到数据触发函数:` + msg); ////////////...
来源: Laya_社区 发布时间: 20180424
...{ Event } from "laya/events/Event"; export class Physics_Physics_Tumbler { private count = 0; private box: Sprite; private totalBox = 200; private label: Label; Main: typeof Main = null; constructor(maincls: typeof Main) { this.Main = maincls; Laya.Config.isAntialias = true; Laya.init(Browser.client...
来源: Laya2.0_示例 发布时间: 20251209
关于切换图片的问题 class Main{ private plane1:string = "res/plane.png"; private plane2:string = "res/untitled.png"; private img: Laya.Sprite; private flag: boolean = false; constructor() { Laya.init(1000,800); this.img = new Laya.Sprite; this.img.loadImage(this.plane1); Laya.stage.addChild...
来源: Laya_社区 发布时间: 20180406
...addChild打开的; 新建一个UIManagerexport class UIManager { private mainContent: Laya.Sprite; private scene: GameScence; private uiList:any; constructor() { this.mainContent = new Laya.Sprite(); this.uiList = ; } }mainContent 为默认添加到的层级, GameScence 为UI管理器默...
来源: Laya_社区 发布时间: 20190222
...仿生兽 */ export class Physics_Strandbeests { Main: typeof Main = null; private scale = 2.5; private pos: Array = [500, 400]; private m_offset: Array = [0, -80 * this.scale]; private pivot: Array = [0, 8 * this.scale]; private wheel: Sprite; private chassis: Sprite; private motorJoint: RevoluteJo...
来源: Laya2.0_示例 发布时间: 20251209
...his, this.onBtnClick); this.btn2.on(Laya.CLICK, this, this.onBtn2Click); } private onBtnClick(): void { //手动控制组件属性 this.radio.selectedIndex = 1; this.clip.index = 8; this.tab.selectedIndex = 2; this.combobox.selectedIndex = 0; this.check.selected = true; } private onBtn2Click(): void...
来源: Laya_示例 发布时间: 20251209
...his, this.onBtnClick); this.btn2.on(Laya.CLICK, this, this.onBtn2Click); } private onBtnClick(): void { //手动控制组件属性 this.radio.selectedIndex = 1; this.clip.index = 8; this.tab.selectedIndex = 2; this.combobox.selectedIndex = 0; this.check.selected = true; } private onBtn2Click(): void...
来源: Laya2.0_示例 发布时间: 20200319
...ass } = Laya; @regClass() export class WebSocketDemo extends Laya.Script { private socket: Laya.Socket; //组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { this.socket = new Laya.Socket(); // 注册事件监听 this.socket.on(Laya.Event.OPEN, this, this.onSocketOpen); t...
来源: Laya3.0_文档 发布时间: 20251010
...一个Socket实例,声明一个Byte实例: ```typescript class Game { private socket: Laya.Socket; private byte: Laya.Byte; constructor() { //初始化引擎 Laya.init(600, 400, Laya.WebGL); this.byte = new Laya.Byte(); //这里我们采用小端 this.byte.endian = Laya.Byte.LITTLE_ENDIAN; this....
来源: Laya2.0_文档 发布时间: 20210714
...cket; import laya.utils.Byte; import laya.webgl.WebGL; public class Game { private var socket:Socket; private var byte:Byte; public function Game() { //初始化引擎 Laya.init(600, 400,WebGL);// this.byte = new Byte(); this.byte.endian = Byte.LITTLE_ENDIAN;//这里我们采用小端; this.socket...
来源: Laya2.0_文档 发布时间: 20210715