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

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

261. 用Socket连接服务器,服务端显示已经有登录,但Event.OPEN没有触发 [ 56%]

...import laya.utils.Byte;               public class CConnector extends Socket     {         protected var sendBuf:Byte = null;         protected var recvBuf:Byte = null;                  public function CConnector()         {          ...

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

262. webgl 下当对象子显示对象存在panel且panel有子集时,旋转此显示对象会导致此显示对象的同级对象消失!(1.7.10beta) [ 56%]

...d消失 parent.child_1.rotation = Math.random() * 180; } } class ChildView extends ui.ChildViewUI{ constructor(){ super(); var panel = new Laya.Panel(); panel.pos(0,0); panel.size(200,50); this.addChild(panel); var panelChild = new Laya.Sprite(); panelChild.pos(0,0); panelChild.size(200,50); panel.a...

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

263. Morn下List组件如何给每一条列表添加Click事件,是需要for吗? [ 56%]

...e.components.Box; import morn.core.handlers.Handler; public class ListView extends ListViewUI { public function ListView() { super(); var arr:Array=[]; for(var i:int=0;i<95;i++) { arr.push({icon:i,label:"Index"+i}); } boxList.array=arr; boxList.mouseHandler=new Handler(listRender); } private func...

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

264. hitTestPoint对象父容器rotation旋转之后检测不了碰撞 [ 56%]

...rotation旋转之后检测不了碰撞   附上代码  class FishPonds extends Laya.Sprite { public are: Laya.Rectangle = new Laya.Rectangle(0, 0, 60, 30); constructor() { super(); var _fish: Laya.Sprite = new Laya.Sprite() _fish.graphics.drawRect(this.are.x, this.are.y, this.are.width, this.are.h...

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

265. 求助,屏幕旋转后滚动条没有跟随旋转 [ 56%]

...幕旋转后滚动条没有跟随旋转 module dialog { export class WanF extends ui.dialog.WanFUI { constructor() { super(); this.rotation = 90; this.pos(1060, 280); let panel = new Laya.Panel(); panel.size(638, 527); panel.vScrollBarSkin = "CommDialog/vscroll.png"; this.sp_wanfa.addChild(panel); l...

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

266. Laya3D场景加载问题 [ 56%]

...试内容:加载3D场景   代码如下: export default class TestUI extends ui.test.TestSceneUI {     private resource: Array<String> = [         "gate/Conventional/Test.ls",     ];     constructor() { super(); }     onAwake(): void {         Laya.loader.create(this.resou...

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

267. 这种进度条怎么实现? [ 56%]

...llen 赞同来自:  import Sprite = Laya.Sprite export default class Test extends Sprite{ public DEF_SIZE: number = 200 public CIRCLE_WIDTH: number = 20 public $circleSprite: Sprite = new Sprite() public startY: number = -90 constructor() { super() this._init() } private _init() { this.cacheAs = "b...

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

268. 为什么创建的脚本 变量在编辑模式赋值后 运行时为undfined [ 56%]

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

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

269. 自定义页面基类的时候,会自动添加Laya命名空间导致报错 [ 56%]

...w) declare module Laya{//在这个module里添加     class BaseView extends Scene{}//继承自Scene }里加上自己定义的页面,然后在编辑页面F9的Code导入类里写上引用和赋值   import BaseView from "../BaseView"; Laya.BaseView = BaseView 2019-09-06 0 1 分享 微博 QZ...

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

270. 3D场景中背景无法透明,版本2.7.1 [ 56%]

...2.7.1,无法背景透明,永远是黑色 export default class GameUI extends Laya.Scene { constructor() { super(); Config.isAlpha = true; Laya.init(480, 900); Laya.stage.bgColor = null; //加载场景文件 this.loadScene("test/TestScene.scene"); //添加3D场景 var scene = Laya.stage.addChild(...

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