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

大约有 420 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0038 秒)

171. 动效问题,没有 ui.TestPUI,官方文档是错的,几年了至今无解答 [ 62%]

...Laya.Scene; var REG = Laya.ClassUtils.regClass; export class kick_effectUI extends EffectAnimation { //然后又改成Laya.EffectAnimation constructor(){ super(); this.ani1=null; this.effectData =ui.kick_effectUI.uiView;; } } kick_effectUI.uiView={"type":"View","props":{},"compId":2,"child":[{"type"...

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

172. 为啥静态变量name不能定义 [ 62%]

...tor function 'GFHomePageView'. 代码如下: export class GFHomePageView extends ui.GFGameHomeUI { static name = "homepageview"; static moreBgNodeName = "morebgnode"; static diamondList: any; static clickedWeixinClose:boolean = false; 2017-09-08 添加评论 免费帖 --> 分享 微博 QZONE 微...

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

173. RopeJoint代码动态创建 无法设置otherbody [ 62%]

...0110110110@qq.com * @ data: 2022-04-09 15:53 */ export default class fruit extends Laya.Script {     static Fru:fruit;     public rope:Laya.RopeJoint     constructor() {         super();        fruit.Fru=this;             }      onAwake() {         let rig:Laya.RigidBody=t...

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

174. 3D场景跳转到2D场景问题 [ 62%]

...UI' import GameScene from './GameScene'; export default class VictoryScene extends VictorySceneUI {  constructor() { super();   } onAwake(){ let btnOnce=this.getChildByName("btnOnce"); btnOnce.on(Laya.Event.CLICK,this,this.onClick); } onClick(e){ this.removeSelf(); let gameScene=new GameScene(); L...

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

175. 实例化 laya.ani.bone.Skeleton 对象报错 [ 61%]

...例化 laya.ani.bone.Skeleton 对象报错 export default class showSpine extends Laya.Script{ constructor() { super(); //创建一个Skeleton对象 //Laya let skeleton: laya.ani.bone.Skeleton = new laya.ani.bone.Skeleton(); } } 实例化报错 为啥 2018-09-28 添加评论 免费帖 --> 分享 微...

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

176. Tween.to时添加滤镜 [ 61%]

...为getter和setter,以写子类继承为例: public class CustomBitmap extends Sprite { public function CustomBitmap() { } public get luminance():Number { //返回亮度参数值 //... } //亮度,其他一样 public set luminance(value:Number):void { //你自己的处理代码 //... } } var disp...

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

177. 微信小游戏,实现监听前后台切换 [ 61%]

...ntroller.js  import wxHelper from 'wxhelper' export default class welcome extends Laya.Script { constructor() { super() } onEnable() { wxHelper.onShow(this.resumeGame) wxHelper.onHide(this.pauseGame) } resumeGame () { console.log('resumeGame') } pauseGame () { console.log('pauseGame') } onDestroy (...

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

178. HTMLIframeElement加载html网页的问题 [ 61%]

...et.Loader; import HTMLIframeElement = Laya.HTMLIframeElement; class TestUI extends ui.htmlUI { constructor() { super(); var iHtml: HTMLIframeElement = new HTMLIframeElement(); Laya.stage.addChild(iHtml); iHtml.href = "https://www.baidu.com/"; } } // 程序入口 Laya.init(600, 400); Laya.loader.load...

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

179. 鼠标脚本(ActionScript-3D基础(AS3)-LayaAir3D之鼠标交互) [ 61%]

...都添加了脚本。 > **脚本类**: ```typescript class MouseScript extends Script3D{ private var meshsp:MeshSprite3D; public function MouseScript() {} /** * 覆写3D对象组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ override public func...

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

180. 聊天消息对话框中new一个HTMLDivElement 报错"Illegal constructor",请问这个该怎么处理? [ 61%]

...错"Illegal constructor",请问这个该怎么处理? class ChatLineView extends Laya.Box{ textfield : any = null; constructor(){ super(); // this.initLineView(); } public initLineView (data) : void { this.pos(0,0); console.log(this.textfield); if (this.textfield == null) { var stextfield = new HT...

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