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

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

91. 输入设备-摇一摇 [ 79%]

...; import Event = Laya.Event; export class InputDevice_Shake { private picW:number = 484; private picH:number = 484; private console:Text; private shakeCount:number = 0; constructor() { Laya.init(this.picW, Browser.height * this.picW / Browser.width); Laya.stage.scaleMode = Stage.SCALE_SHOWALL; this....

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

92. 其他引擎的Demo-Example_23 [ 78%]

...ha *= 0.9; laser.scaleY = laser.alpha; if (laser.alpha = []; private tick: number = 0; private frequency: number = 80; private type: number = 0; constructor() { Laya.init(this.viewWidth, this.viewHeight, WebGL); Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL; Laya.stage.scaleMode = Stage.SCALE_NOBO...

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

93. LayaAir 2.0 TS版编译出错GameConfig跟创建项目时生成的内容不一致了 [ 78%]

... * 游戏初始化配置; */ export default class GameConfig{ static width:number=640; static height:number=1136; static scaleMode:string="fixedwidth"; static screenMode:string="none"; static startScene:string="test/TestScene.scene"; static sceneRoot:string=""; static debug:boolean=false; static sta...

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

94. 区块地图-等角地图 [ 78%]

...aded(): void { this.layer = this.tiledMap.getLayerByIndex(0); var radiusX: number = 32; var radiusY: number = Math.tan(180 / Math.PI * 30) * radiusX; var color: string = "#FF7F50"; this.sprite = new Sprite(); this.sprite.graphics.drawLine(0, 0, -radiusX, radiusY, color); this.sprite.graphics.drawLin...

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

95. 高级应用-闪光 [ 78%]

...rivate pos1: Laya.Vector3; private pos2: Laya.Vector3; private scaleDelta: number = 0; private scaleValue: number = 0; constructor() { Laya3D.init(0, 0, true); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); var scene: Laya.Scene = Laya...

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

96. 这种进度条怎么实现? [ 78%]

...e = Laya.Sprite export default class Test extends Sprite{ public DEF_SIZE: number = 200 public CIRCLE_WIDTH: number = 20 public $circleSprite: Sprite = new Sprite() public startY: number = -90 constructor() { super() this._init() } private _init() { this.cacheAs = "bitmap" this.size(this.DEF_SIZE,th...

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

97. 区块地图-等角地图 [ 78%]

...aded(): void { this.layer = this.tiledMap.getLayerByIndex(0); var radiusX: number = 32; var radiusY: number = Math.tan(180 / Math.PI * 30) * radiusX; var color: string = "#FF7F50"; this.sprite = new Sprite(); this.sprite.graphics.drawLine(0, 0, -radiusX, radiusY, color); this.sprite.graphics.drawLin...

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

98. 其他引擎的Demo-Example_23 [ 78%]

...ha *= 0.9; laser.scaleY = laser.alpha; if (laser.alpha = []; private tick: number = 0; private frequency: number = 80; private type: number = 0; constructor() { Laya.init(this.viewWidth, this.viewHeight, WebGL); Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL; Laya.stage.scaleMode = Stage.SCALE_NOBO...

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

99. 鼠标交互-滑动 [ 78%]

... export class Interaction_Swipe { //swipe滚动范围 private TrackLength: number = 200; //触发swipe的拖动距离 private TOGGLE_DIST: number = this.TrackLength / 2; private buttonPosition: number; private beginPosition: number; private endPosition: number; private button: Sprite; constructor() ...

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

100. 鼠标交互-键盘交互 [ 77%]

...} /**键盘按下处理*/ private onKeyDown(e: Event): void { var keyCode: number = e["keyCode"]; this.keyDownList[keyCode] = true; } /**键盘抬起处理*/ private onKeyUp(e: Event): void { delete this.keyDownList[e["keyCode"]]; } private keyboardInspector(): void { var numKeyDown: number = this.k...

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