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

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

161. 为啥静态变量name不能定义 [ 59%]

...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

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

...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

163. 3D场景跳转到2D场景问题 [ 59%]

...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

164. 刚接触laya的一系列问题 [ 59%]

...直接在后面添加,无效,得到的提示:[ts] Classes can only extend a single class; 3,关于锚点找到锚点设置无效的问题了,我在构造函数设置的,没效果,但是如果在延迟两帧以后设置就可以了,用不了button,只能用this和super;

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

165. 动画节点 · LayaAir3.3 · 引擎文档 · LAYABOX [ 59%]

... const { regClass, property } = Laya; @regClass() export class Animation extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Animation }) //在IDE面板中显示属性 ani: Laya.Animation; constructor() { super(); } //组件被激活后执行,此时所有节点和组件...

来源: Laya3.0_文档 发布时间: 20251010

166. 实例化 laya.ani.bone.Skeleton 对象报错 [ 59%]

...例化 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

167. 发布后的code.js文件优化问题 [ 59%]

...较大,ts类比较多,转化成js后   1.每个js文件中的开头 __extends 在发布后都在,这个只需保留一个即可。 2.不同js如果module相同的,能否合并到一起,不然会出现非常多的类似 t.widgets || (t.widgets = {}) 这种东西。   目前的js压缩只...

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

168. Tween.to时添加滤镜 [ 59%]

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

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

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

...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

170. HTMLIframeElement加载html网页的问题 [ 59%]

...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