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

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

731. 小游戏初始化黑屏 [ 54%]

...gColor无效 Laya.MiniAdpter.init(); Laya.init(450, 800); class GameMain { constructor() { Laya.stage.scaleMode = Laya.Stage.SCALE_SHOWALL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; Laya.stage.alignH = Laya.Stage.ALIGN_CENTER; Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE; Laya.stage.bgColor = "...

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

732. 为啥静态变量name不能定义 [ 54%]

...Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'GFHomePageView'. 代码如下: export class GFHomePageView extends ui.GFGameHomeUI { static name = "homepageview"; static moreBgNodeName = "morebgnode"; static diamondList: any; static clickedWeixinClo...

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

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

...ya.Script {     static Fru:fruit;     public rope:Laya.RopeJoint     constructor() {         super();        fruit.Fru=this;             }      onAwake() {         let rig:Laya.RigidBody=this.owner.getComponent(Laya.RigidBody);         var lala=UIcontrol.FUI.bg.getComp...

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

734. ts怎么判断对象是否是某个类 [ 54%]

...// 声明数组[1,2,3]  alert(arr instanceof Array); // false  alert(arr.constructor === Array); // false    2017-11-02 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 sky_fly 相关问题 两个对象new了一个相同的对象,调...

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

735. 3D场景跳转到2D场景问题 [ 54%]

..../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(); Laya.stage.addChild(gameScen...

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

736. 屏幕适配-缩放-No Scale [ 54%]

... Laya.Stage; export class SmartScale_Scale_NOSCALE { private rect: Sprite; constructor() { Laya.init(550, 400); Laya.stage.scaleMode = Stage.SCALE_NOSCALE; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite(); this.rect.graphics.dra...

来源: Laya_示例 发布时间: 20241002

737. 屏幕适配-缩放-No Border [ 54%]

...Laya.Stage; export class SmartScale_Scale_NOBORDER { private rect: Sprite; constructor() { Laya.init(550, 400); Laya.stage.scaleMode = Stage.SCALE_NOBORDER; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite(); this.rect.graphics.dr...

来源: Laya_示例 发布时间: 20241002

738. laya.d3.math.Rand [ 54%]

...:uint):voidseedsproperty public var seeds:Uint32Array获取随机种子。Constructor DetailRand()Constructorpublic function Rand(seed:uint) 创建一个 Rand 实例。 Parameters seed:uint — 32位无符号整型随机种子。 Method DetailgetByteFromInt()method public static function getByteFro...

来源: laya_api 发布时间: 20170929

739. laya.d3.math.Rand [ 54%]

...:uint):voidseedsproperty public var seeds:Uint32Array获取随机种子。Constructor DetailRand()Constructorpublic function Rand(seed:uint) 创建一个 Rand 实例。 Parameters seed:uint — 32位无符号整型随机种子。 Method DetailgetByteFromInt()method public static function getByteFro...

来源: Laya2.0_api 发布时间: 20190513

740. 高级应用-基于物理渲染 [ 54%]

...yName("Camera"); camera.addComponent(CameraMoveScript); });class PBRDemo { constructor() { Laya3D.init(0, 0, true); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); var scene: Laya.Scene = Laya.stage.addChild(Laya.Scene.load("../../res/t...

来源: Laya_示例 发布时间: 20241002