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

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

151. TS版分包报错 [ 60%]

...类似如下代码: module ui.coreUI {         export class TestUI extends View{         // do something...         } }       我在其它包的类中通过 import TestUI = ui.coreUI.TestUI ;  方式引入类 定义时报错:  "Uncaught ReferenceError: ui is not defined"    ...

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

152. 动画节点 · LayaAir3.0文档 · LAYABOX [ 60%]

... 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_文档 发布时间: 20230629

153. 编辑模式下的赋值不保留? [ 59%]

... • 2018-10-25 14:56 写一个ts文件,写上 export default class Move extends Laya.Script{ /** @prop {name:target,tips:"目标容器",type:Prefab}*/ targetPrefab:Laya.Prefab; } 将文件在编辑模式下赋给点添加组件=》code=》move 然后创建一个box拖为预制体 放在...

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

154. 鼠标脚本(TypeScript-3D基础(TS)-LayaAir3D之鼠标交互) [ 59%]

...本。 > **脚本类**: ```typescript export default class MouseScript extends Laya.Script3D{ private meshsp:Laya.MeshSprite3D; constructor(){super();} /** * 覆写3D对象组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(){ this.meshsp ...

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

155. 为什么hitTestPoint始终是false? [ 59%]

为什么hitTestPoint始终是false? class TestUI extends Laya.Sprite { private s:Laya.Sprite = new Laya.Sprite(); constructor() { super(); var img:Laya.Image = new Laya.Image("comp/bg.png"); this.s.addChild(img); this.addChild(this.s); Laya.stage.on(Laya.Event.CLICK, this, this.hitPoint); } priv...

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

156. 输入文本组件 · LayaAir3.0文档 · LAYABOX [ 59%]

...t { regClass, property } = Laya; @regClass() export class TextInputControl extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type : Laya.TextInput } ) public txtin: Laya.TextInput; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建...

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

157. runTime使用(ActionScript-IDE篇(AS3)-组件化开发相关) [ 59%]

...** *ImageRunTime逻辑类 * @author mengjia * */ public class ImageRunTime extends Image { //缩放时间100毫秒 public var scaleTime:int = 100; public function ImageRunTime() { //设置组件的中心点 this.anchorX = this.anchorY = 0.5; //添加鼠标按下事件侦听。按时时缩小按钮...

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

158. 为啥静态变量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

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

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