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

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

301. Sprite-新手引导 [ 52%]

...tip:"../../res/guide/help3.png", tipx:900, tipy:300 } ]; private guideStep:number = 0; private hitArea:HitArea; private interactionArea:Sprite; constructor() { Laya.init(1285, 727); Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.alignV = Stage.ALIGN_MIDDLE; //绘制一个蓝色方块,不被抠...

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

302. UI-Clip [ 52%]

...g = "../../res/ui/coutDown.png"; private counter: Clip; private currFrame: number; private controller: Button; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = ...

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

303. 2D物理-碰撞事件与传感器 [ 52%]

...gl.WebGL; public class Physics_Physics_CollisionEvent { private var count: Number = 7; private var sensorCollider: CircleCollider; private var bodys: Array = []; private var touching: Array = []; public function Physics_CollisionEvent() { Laya.Config.isAntialias = true; Laya.init(1200, 700, WebGL); ...

来源: Laya2.0_示例 发布时间: 20241118

304. Sprite-新手引导 [ 52%]

...:110, tip:"res/guide/help3.png", tipx:900, tipy:300 } ]; private guideStep:number = 0; private hitArea:HitArea; private interactionArea:Sprite; constructor() { Laya.init(1285, 727); Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.alignV = Stage.ALIGN_MIDDLE; //绘制一个蓝色方块,不被抠...

来源: Laya2.0_示例 发布时间: 20241118

305. Label属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 51%]

...eateLabel(color: string, strokeColor: string): Label { const STROKE_WIDTH: number = 4; var label: Label = new Label(); label.font = "Microsoft YaHei"; label.text = "SAMPLE DEMO"; label.fontSize = 30; label.color = color; if (strokeColor) { label.stroke = STROKE_WIDTH; label.strokeColor = strokeColor...

来源: Laya2.0_文档 发布时间: 20210715

306. UI-Clip [ 51%]

... string = "res/ui/coutDown.png"; private counter: Clip; private currFrame: number; private controller: Button; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = ...

来源: Laya2.0_示例 发布时间: 20241118

307. ProgressBar属性详解(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 51%]

....05; } /***进度条数据改变回调***/ private function onChange(value:Number):void { trace("进度:" + Math.floor(value * 100) + "%"); } } } ```

来源: Laya2.0_文档 发布时间: 20210715

308. 屏幕适配-屏幕适配 [ 51%]

...", "fixedwidth", "fixedheight"]; //当前适配模式索引 private index: number = 0; //全局文本信息 private txt: Text; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(1136, 640, WebGL); //设置适配模式 Laya.stage.scaleMode = "noscale"; //设置横竖屏 Laya.stage.sc...

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

309. httpRequest send返回Request failed Status:0 [ 51%]

...URL, id, data) { // private completeHandler(data: Object, URL: string, id: number): void { //加载完成返回的data是arraybuffer; //......这里处理我们加密的图片数据,假设我们的图片加密数据是在图片的前面写入了四个字节的数据 //......解密逻辑开始处...

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

310. setSubPixels画布擦除不掉 [ 51%]

...ath.random()); let tex:Laya.Texture = Laya.Loader.getRes(this.bUrl); let x:number = this._testStatus == true ? 0:50;//Math.random()>0.5 ? 50 : 0; this._testStatus = !this._testStatus; // let canvasInfo = this.getCanvasWidthHeight(); let ctx = new Laya.Context(); // let w = canvasInfo.w//tex.width...

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