大约有 517 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0039 秒)
...bgColor = "#232628"; Stat.show(); Laya.loader.load(apePath, Handler.create(this, this.createApe)); } createApe() { const Sprite = Laya.Sprite, Event = Laya.Event; this.ape = new Sprite(); this.ape.loadImage(apePath); let texture = Laya.loader.getRes(apePath); this.ape.pivot(texture.width / 2, textur...
来源: Laya2.0_示例 发布时间: 20241117
...apFont(); bitmapFont.loadFont("../../res/bitmapFont/test.fnt", new Handler(this, onFontLoaded, [bitmapFont])); } function onFontLoaded(bitmapFont) { bitmapFont.setSpaceWidth(10); Text.registerBitmapFont(fontName, bitmapFont); createText(fontName); } function createText(font) { var txt = new Text(); ...
来源: Laya_示例 发布时间: 20241117
...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.setup(); } private setup(): void { this.createLabel("#FFFFFF", null).pos(30, 50); this.createLabel("#00FFFF", null).pos(290, 50); this.createLabel("#FFFF00", "#FFFFFF").pos(30, 100); this.createLabel("#000000", "#FFFFFF"...
来源: Laya_示例 发布时间: 20241117
...", "../../res/ui/vslider$bar.png"); Laya.loader.load(skins, Handler.create(this, onLoadComplete)); })(); function onLoadComplete() { placeHSlider(); placeVSlider(); } function placeHSlider() { var hs = new HSlider(); hs.skin = "../../res/ui/hslider.png"; hs.width = 300; hs.pos(50, 170); hs.min = 0; ...
来源: Laya_示例 发布时间: 20241117
...(); })(); function setup() { createSprite(); Laya.stage.on(Event.MOUSE_UP, this, onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, onMouseUp); } function createSprite() { sp = new Sprite(); var w = 200, h = 300; sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); sp.size(w, h); sp.pivot(w / 2, h / 2); sp.po...
来源: Laya_示例 发布时间: 20241117
...OWALL; Laya.stage.bgColor = "#232628"; createMap(); Laya.stage.on("click", this, onStageClick); })(); function createMap() { tiledMap = new TiledMap(); tiledMap.createMap("../../res/tiledMap/isometric_grass_and_water.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), Handler.create(thi...
来源: Laya_示例 发布时间: 20241117
...export default class HelloWorld extends Laya.Text { constructor(){ super() this.text = "Hello Layabox" this.color = '#ffffff' } } 2017-11-20 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 3 个回复 Monica - 知识达人 ...
来源: Laya_社区 发布时间: 20171120
...age.alignH = 'middle'; // 适配水平对齐方式 Laya.stage.screenMode = this.Stage.SCREEN_HORIZONTAL; // 始终以横屏展示 Laya.stage.scaleMode = "fixedwidth"; // 宽度不变 this.engine; var world; this.engine = Matter.Engine.create({ enableSleeping: true // 开启睡眠 }); world = this.en...
来源: Laya_社区 发布时间: 20180522
...p(); })(); function setup() { var xmlValueContainsError = "item aitem bsomethis..."; var xmlValue = "item aitem bsomethings..."; proessXML(xmlValueContainsError); console.log("\n"); proessXML(xmlValue); } function proessXML(source) { try { var xml = Utils.parseXMLFromString(source); } catch (e) { co...
来源: Laya_示例 发布时间: 20241117
...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Event = Laya.Event; this.createApe(); this.createTimerLine(); Laya.stage.on(Event.KEY_DOWN, this, this.keyDown); } createApe() { const Sprite = Laya.Sprite; this.target = new Sprite(); Laya.sta...
来源: Laya2.0_示例 发布时间: 20241117