大约有 401 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0044 秒)
...?代码如下: /**Created by the LayaAirIDE*/ module view { export class Guide extends ui.GuideUI { constructor() { super(); // 创建Video元素 let videoElmt: any = Laya.Browser.createElement("video"); Laya.Browser.document.body.appendChild(videoElmt); // 设置Video元素地样式和属性...
来源: Laya_社区 发布时间: 20180802
....StageScaleMode; import flash.events.Event; import login.LoginView; public class Main extends Sprite { public function Main():void { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); t...
来源: Laya_社区 发布时间: 20151103
...之后材质基类由BaseMaterial变更为Material。 ```typescript export class CustomMaterial extends Laya.Material { public function CustomMaterial() { super(); //设置本材质使用的shader名字 this.setShaderName("CustomShader"); } } ``` #### 4.使用自定义材质 在使用自定义...
来源: Laya2.0_文档 发布时间: 20210715
...ld(this.img); this.setImg = function (src) { this.img.skin = src; } } Laya.class(RankListItem, "RankListItem", Laya.Box); //rankList var rankList = new Laya.List(); rankList.itemRender = RankListItem; rankList.repeatX = 1; rankList.repeatY = 4; // 使用但隐藏滚动条 rankList.vScrollBarSkin = "...
来源: Laya_社区 发布时间: 20180416
Cannot read property 'rayCast' of undefined export default class indexscene extends Laya.Script { constructor(){ super(); this.rotation = new Laya.Vector3(0, 0.01, 0); this.point = new Laya.Vector2(); this.ray = new Laya.Ray(new Laya.Vector3(),new Laya.Vector3()); //1.开启第四个参数 let conf...
来源: Laya_社区 发布时间: 20200903
....0,跟示例里效果一样的文件: /** * ... * @author */ export class CameraMoveScript extends Laya.Script { /** @private */ protected _tempVector3: Laya.Vector3 = new Laya.Vector3(); protected lastMouseX: number; protected lastMouseY: number; pro...
来源: Laya_社区 发布时间: 20200707
...物理引擎碰撞被禁用的,需要重新开启 修改 laya.d3.js class PhysicsCollider extends PhysicsTriggerComponent { constructor(collisionGroup = Physics3DUtils.COLLISIONFILTERGROUP_DEFAULTFILTER, canCollideWith = Physics3DUtils.COLLISIONFILTERGROUP_ALLFILTER) { super(c...
来源: Laya_社区 发布时间: 20191017
...(this.img); this.setImg = function(src) { this.img.skin = src; } } Laya.class(Item, "Item", Box); // 主要逻辑代码 var Stage = Laya.Stage; var List = Laya.List; var Handler = Laya.Handler; var WebGL = Laya.WebGL; (function() { // 不支持WebGL时自动切换至Canvas L...
来源: Laya_社区 发布时间: 20180724
...可以根据自己需求调整,这个是json的格式: // 程序入口 class GameMain{ constructor() { Laya.init(600,400); var that = this; Laya.loader.load([{"url":"res/playerKpiFont.json","type":Laya.Loader.JSON}, {"url":"res/playerKpiFont.png","type":Laya.Loader.IMAGE}],new Laya.Handler(that,...
来源: Laya_社区 发布时间: 20161014
...浏览: 2083 关注: 2 人 198*****136 • 2020-09-11 16:34 export default class Scene_Battle extends Laya.Script{ playerUnitReady:number; enemyUnitReady:number; private playerUnit:Laya.Animation[]; private enemyUnit:Laya.Animation[]; constructor(){ super(); Laya.stage.alignH= Laya.Stage.ALIGN_CENTE...
来源: Laya_社区 发布时间: 20200910