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

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

141. 基础文本 · LayaAir3.3 · 引擎文档 · LAYABOX [ 61%]

... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Text }) txt: Laya.Text; constructor() { super(); } onAwake(): void { this.txt.text = "第{n=1}页"; //显示文本的初始化内容 } onStart(): voi...

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

142. List组件拖动浏览时item会出现重叠的现象 [ 61%]

... laya.ui.Image; import Label = Laya.Label; export class ListDataSourceItem extends Box { public static WID: number = 200; public static HEI: number = 20; // private _img: Image = null; private _lb:Label = null; constructor() { super(); this._lb = new Label(); this._lb.size(ListDataSourceItem.WID, Li...

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

143. viewportPointToRay产生的射线始终有偏差,是为什么? [ 61%]

...Vector4; import WebGLContext = Laya.WebGLContext; export class SceneScript extends Script { private _originPosition:Vector3 = new Vector3(0, -1, 1); private _phasorSpriter3D:PhasorSpriter3D; private _color:Vector4 = new Vector4(1, 0, 0, 1); private _point:Vector2 = new Vector2(); private _camera:Cam...

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

144. 请问laya有没有类似翻页容器(pageView)的组件? [ 60%]

...fo"; import { ui } from "../ui/layaMaxUI"; export default class RuleDialog extends ui.scene.RuleDialogUI { private m_index: number = -1; private m_downValue: number = -1; constructor() { super(); this.list_rule.hScrollBarSkin = ""; this.list_rule.renderHandler = new Laya.Handler(this, this.updateIte...

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

145. 项目入口说明 · LayaAir3.3 · 引擎文档 · LAYABOX [ 60%]

..."); }); const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { onStart() { console.log("Game start"); } } 2.2 场景的脚本说明 前面讲了项目的入口, 本小节简述一下场景的脚本。场景的脚本主要是两类, 一类是自定义的组件脚...

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

146. UI加载完成后无法获取控件的大小——超详细版问题 [ 60%]

... Loader = laya.net.Loader; import Stage = laya.display.Stage; class TestUI extends ui.test.testwhUI { constructor() { super(); this.mypan.vScrollBarSkin = ""; Laya.stage.on(Laya.Event.RESIZE, this, this.fitDOMElements); this.mypan.vScrollBar.on(Laya.Event.CHANGE, this, this.fitDOMElements_scroll); }...

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

147. 重复背景,全方向地图拖动Demo [ 60%]

...age  var分别: map0,map1,map2,map3 背景图宽高 1800 class WorldPage extends ui.WorldPageUI{ constructor (x,y) { super() this.maxX = 149850 this.maxY = 97500 this.offsetX = x * 150 this.offsetY = y * 150 this.downMouseX = 0 this.downMouseY = 0 Laya.loader.load(['bg/world_bg.jpg']) Laya.stage.o...

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

148. 自定义组件时,设置组件子节点的image的skin时,路径为layaIde的路径而非项目路径 [ 60%]

...ui.Image; /** * ... * @author Caixiansheng */ public class HProgressSlider extends HSlider { /**@private */ protected var _progress:Image protected var _proMask:Sprite; public function HProgressSlider(skin:String=null) { super(skin); } override protected function initialize():void{ super.initialize(...

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

149. [LayaAir 2.0] 如何用代码为Spirte添加2d物理特性 [ 60%]

...是IDE篇的。   我试着用代码实现物理效果class CollisionBoll extends Laya.Sprite { private _boll1:Laya.Sprite; constructor() { super(); //物理模块 this._boll1 = new Laya.Sprite(); this.addChild(this._boll1); this._boll1.x = 20; this._boll1.loadImage('comp/btn_close.png'); let box:l...

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

150. 添加组件code里面自定义脚本不显示 [ 60%]

...没必要无限循环检查继承关系,开发者只能是采用注释加extends Laya.script这个关键字来解决了。   当前的版本,请先用你自己证实的注释+继承脚本的方式,显示出来吧。 2021-10-18 0 6 分享 微博 QZONE 微信 柠檬_酸 赞同来自: 你的dem...

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