• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 147 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0026 秒)

101. 计时器-延迟调用 [ 60%]

..."#232628"; this.demonstrate(); } private demonstrate(): void { for (var i: number = 0; i < 10; i++) { Laya.timer.callLater(this, this.onCallLater); } } private onCallLater(): void { console.log("onCallLater triggered"); var text: Text = new Text(); text.font = "SimHei"; text.fontSize = 30; text.colo...

来源: Laya2.0_示例 发布时间: 20251130

102. Sprite-缓存为静态图像 [ 60%]

...: Sprite = new Sprite(); // 随机摆放文本 var text: Text; for (var i: number = 0; i < 1000; i++) { text = new Text(); text.fontSize = 20; text.text = (Math.random() * 100).toFixed(0); text.rotation = Math.random() * 360; text.color = "#CCCCCC"; text.x = Math.random() * Laya.stage.width; text.y ...

来源: Laya2.0_示例 发布时间: 20251130

103. 网络和格式-Socket [ 60%]

...output.writeByte发送 var message: string = "demonstrate "; for (var i: number = 0; i "); // 使用output.writeByte发送 var message:String = "demonstrate "; for (var i:int = 0; i < message.length; ++i) { output.writeByte(message.charCodeAt(i)); } socket.flush(); } private function onSocketClose(e...

来源: Laya2.0_示例 发布时间: 20251130

104. WebSocket发送与接收数据(ActionScript-LayaAir基础篇(AS3)-数据与通信) [ 60%]

... var a:int = this.byte.getByte(); var b:int = this.byte.getInt16(); var c:Number = this.byte.getFloat32(); var d:String = this.byte.getString(); var e:String = this.byte.getUTFString(); } ```

来源: Laya2.0_文档 发布时间: 20210715

105. UI-Label [ 59%]

...eateLabel(color: string, strokeColor: string): Label { const STROKE_WIDTH: number = 4; var label: Label = new Label(); label.font = "Microsoft YaHei"; label.text = "SAMPLE DEMO"; label.fontSize = 30; label.color = color; if (strokeColor) { label.stroke = STROKE_WIDTH; label.strokeColor = strokeColor...

来源: Laya_示例 发布时间: 20251130

106. 网络和格式-XML [ 59%]

...de:any = xml.firstChild; var nodes:Array = rootNode.childNodes; for (var i:number = 0; i item aitem bsomethis..."; var xmlValue:String = "item aitem bsomethings..."; proessXML(xmlValueContainsError); trace("\n"); proessXML(xmlValue); } // 使用xml private function proessXML(source:String):void { tr...

来源: Laya_示例 发布时间: 20251130

107. UI-Label [ 59%]

...eateLabel(color: string, strokeColor: string): Label { const STROKE_WIDTH: number = 4; var label: Label = new Label(); label.font = "Microsoft YaHei"; label.text = "SAMPLE DEMO"; label.fontSize = 30; label.color = color; if (strokeColor) { label.stroke = STROKE_WIDTH; label.strokeColor = strokeColor...

来源: Laya2.0_示例 发布时间: 20251130

108. 经验分享:如何控制龙骨动画的播放索引! [ 59%]

...te var mArmature:Skeleton; private var index:int;//帧频 private var time:Number; public function DragonDemo() { Laya.init(800,600,WebGL); index=15; mFactory=new Templet(); mFactory.on(Event.COMPLETE,this,omTemLoaded); mFactory.loadAni('NewDragon/NewDragon.sk'); } private function omTemLoaded():voi...

来源: Laya_社区 发布时间: 20170509

109. 缓动-简单的Tween [ 58%]

...gColor = "#232628"; this.setup(); } private setup(): void { var terminalX: number = 200; var characterA: Sprite = this.createCharacter("../../res/cartoonCharacters/1.png"); characterA.pivot(46.5, 50); characterA.y = 100; var characterB: Sprite = this.createCharacter("../../res/cartoonCharacters/2.pn...

来源: Laya_示例 发布时间: 20251130

110. 缓动-简单的Tween [ 58%]

...gColor = "#232628"; this.setup(); } private setup(): void { var terminalX: number = 200; var characterA: Sprite = this.createCharacter("res/cartoonCharacters/1.png"); characterA.pivot(46.5, 50); characterA.y = 100; var characterB: Sprite = this.createCharacter("res/cartoonCharacters/2.png"); charact...

来源: Laya2.0_示例 发布时间: 20251130