大约有 488 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0044 秒)
...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.addChild(panelChild); } } new GameMain()...
来源: Laya_社区 发布时间: 20170829
...mage = Laya.Image; var WID = 373, HEI = 85; function Item() { Item.__super.call(this); this.size(WID, HEI); this.img = new Image(); this.addChild(this.img); this.setImg = function(src) { this.img.skin = src; } } Laya.class(Item, "Item", Box); // 主要逻辑代码 var Stage = Laya.St...
来源: Laya_社区 发布时间: 20180724
... Laya.Animation; // Class Character function Character(images) { Character.super(this); Character.WIDTH = 110; Character.HEIGHT = 110; var bloodBar; var animation; var nameLabel; Character.prototype.createAnimation = function(images) { animation = new Animation(); animation.loadImages(images); anima...
来源: Laya_示例 发布时间: 20250222
...rUnit:Laya.Animation[]; private enemyUnit:Laya.Animation[]; constructor(){ super(); Laya.stage.alignH= Laya.Stage.ALIGN_CENTER; Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE; } onEnable(){ this.playerUnit = []; this.enemyUnit = []; this.playerUnit.push(new Laya.Animation()); this.enemyUnit.push(new La...
来源: Laya_社区 发布时间: 20200910
... Laya.BaseMaterial { static DIFFUSETEXTURE_ID: number = 1; constructor() { super(); this.setShaderName("CustomShader"); } public getDiffuseTexture(): Laya.BaseTexture { return this._getTexture(CustomMaterial.DIFFUSETEXTURE_ID); } public setDiffuseTexture(value: Laya.BaseTexture): void { this._setTex...
来源: Laya_社区 发布时间: 20170815
... @regClass() export class UI_VSlider extends Laya.Script { constructor() { super(); } onAwake(): void { let skins: any[] = []; skins.push("vslider.png", "vslider$bar.png");//图片资源来自“引擎API使用示例” Laya.loader.load(skins, Laya.Handler.create(this, this.placeVSlider)); } private...
来源: Laya3.0_文档 发布时间: 20240910
... @regClass() export class UI_HSlider extends Laya.Script { constructor() { super(); } onAwake(): void { let skins: any[] = []; skins.push("hslider.png", "hslider$bar.png");//图片资源来自“引擎API使用示例” Laya.loader.load(skins, Laya.Handler.create(this, this.placeHSlider)); } private...
来源: Laya3.0_文档 发布时间: 20240910
... default class OutlineMaterial extends Laya.BaseMaterial { constructor() { super() var attributeMap = { 'a_Position': Laya.VertexMesh.MESH_POSITION0, 'a_Normal': Laya.VertexMesh.MESH_NORMAL0, 'a_Texcoord': Laya.VertexMesh.MESH_TEXTURECOORDINATE0, } var uniformMap = { 'u_MvpMatrix': [Laya.Sprite3D.MV...
来源: Laya_社区 发布时间: 20180925
...tring(); } } } class Character extends Laya.Sprite { constructor(images) { super(); this.speed = 5; this.bloodBar; this.animation; this.nameLabel; this.createAnimation(images); this.createBloodBar(); this.createNameLabel(); } createAnimation(images) { const Animation = Laya.Animation; this.animation...
来源: Laya2.0_示例 发布时间: 20250222
...r = 5; private assets: any[]; private dialog: Laya.Dialog; constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { // 图片资源来自“引擎API使用示例” this.assets = ["resources/res/ui/dialog (1)....
来源: Laya3.0_文档 发布时间: 20240910