大约有 116 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0023 秒)
...s.createDom(); this.initMap(); this.createInfoText(); let successHandler = new Handler(this, this.updatePosition); let errorHandler = new Handler(this, this.onError); // 使用高精度位置 Geolocation.enableHighAccuracy = true; Geolocation.watchPosition(successHandler, errorHandler); // 绑定作...
来源: Laya2.0_示例 发布时间: 20251130
...createPage() { const Sprite = Laya.Sprite; // 绘制底图 gameContainer = new Sprite(); Laya.stage.addChild(gameContainer); gameContainer.loadImage("res/guide/crazy_snowball.png"); gameContainer.on(Laya.Event.CLICK, this, this.nextStep); // 引导所在容器 guideContainer = new Sprite(); Laya.sta...
来源: Laya2.0_示例 发布时间: 20251130
....TiledMap, Rectangle = Laya.Rectangle, Point = Laya.Point; this.tiledMap = new TiledMap(); this.tiledMap.createMap("res/tiledMap/isometric_grass_and_water.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), Laya.Handler.create(this, this.mapLoaded), null, new Point(1600, 800)); } onStag...
来源: Laya2.0_示例 发布时间: 20251130
...wContent)); } ShowContent() { const FontClip = Laya.FontClip; var clipnum= new FontClip(assets[0]); var fontClip = new FontClip(assets[1]); var TestFontClip = new FontClip(assets[1]); var TestClipNum = new FontClip(assets[0]); var clipnum1 = new FontClip(assets[0]); clipnum.pos(240, 500); clipnum.si...
来源: Laya2.0_示例 发布时间: 20251130
...ontroller(); } createCharacter() { const Sprite = Laya.Sprite; character = new Sprite(); Laya.stage.addChild(character); character.loadImage("res/cartoonCharacters/1.png"); character.pos(100, 50); } createEaseFunctionList() { const List = Laya.List, Handler = Laya.Handler; let easeFunctionsList = ne...
来源: Laya2.0_示例 发布时间: 20251130
...); } createBridge() { const startPosX = 250, startPosY = 450; let ground = new Laya.Sprite(); Laya.Laya.stage.addChild(ground); let groundBody = new Laya.RigidBody(); groundBody.type = "static"; ground.addComponentIntance(groundBody); let chainCollider = ground.addComponent(Laya.ChainCollider); chai...
来源: Laya2.0_示例 发布时间: 20251130
...HSlider() { const HSlider = Laya.HSlider, Handler = Laya.Handler; let hs = new HSlider("res/ui/hslider.png"); Laya.stage.addChild(hs); hs.width = 300; hs.pos(50, 170); hs.min = 0; hs.max = 100; hs.value = 50; hs.tick = 1; hs.changeHandler = new Handler(this, this.onChange); } placeVSlider() { const ...
来源: Laya2.0_示例 发布时间: 20251130
... { tick = 0; // iterate through the dudes and update the positions laser = new Sprite(); laser.loadImage("res/pixi/laser0" + ((type % 5) + 1) + ".png"); type++; laser.life = 0; let pos1; let pos2; if (type % 2) { pos1 = new Point(-20, Math.random() * viewHeight); pos2 = new Point(viewWidth, Math.ran...
来源: Laya2.0_示例 发布时间: 20251130
...r() { const HScrollBar = Laya.HScrollBar, Handler = Laya.Handler; let hs = new HScrollBar(); Laya.stage.addChild(hs); hs.skin = "res/ui/hscroll.png"; hs.width = 300; hs.pos(50, 170); hs.min = 0; hs.max = 100; hs.changeHandler = new Handler(this, this.onChange); } placeVScroller() { const VScrollBar ...
来源: Laya2.0_示例 发布时间: 20251130
...st BitmapFont = Laya.BitmapFont, Handler = Laya.Handler; this.bitmapFont = new BitmapFont(); this.bitmapFont.loadFont("res/bitmapFont/test.fnt", new Handler(this, this.onFontLoaded, [this.bitmapFont])); } onFontLoaded() { // 设置空格的宽 this.bitmapFont.setSpaceWidth(10); // 注册位图字体...
来源: Laya2.0_示例 发布时间: 20251130