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

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

21. 重复背景,全方向地图拖动Demo [ 98%]

... 1800 class WorldPage extends ui.WorldPageUI{ constructor (x,y) { super() this.maxX = 149850 this.maxY = 97500 this.offsetX = x * 150 this.offsetY = y * 150 this.downMouseX = 0 this.downMouseY = 0 Laya.loader.load(['bg/world_bg.jpg']) Laya.stage.on(Laya.Event.MOUSE_DOWN,this,this.mouseDown) Laya.sta...

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

22. UI-Clip [ 98%]

..."#232628"; Laya.loader.load([buttonSkin, clipSkin, bgSkin], Handler.create(this, this.onSkinLoaded)); } onSkinLoaded() { this.showBg(); this.createTimerAnimation(); this.showTotalSeconds(); this.createController(); } showBg() { const Image = Laya.Image; let bg = new Image(bgSkin); bg.size(224, 302);...

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

23. 鼠标交互-鼠标交互 [ 98%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { this.createInteractiveTarget(); this.createLogger(); } createInteractiveTarget() { const Event = Laya.Event, Sprite = Laya.Sprite; let rect = new Sprite(); rect.graphics.drawRect(0, 0, 200, 200, "#D2...

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

24. 在父sprite中添加子sprite ,移动父Sprite 子sprite为什么不动? [ 98%]

...ngel.level; // 构造 function IsLand() { // 初始化 IsLand.__super.call(this); // 名字 this.name = "gemini"; this.init(); } // 注册类 IsLand Laya.class(IsLand,"IsLand",laya.display.Sprite); // 原型 var _proto = IsLand.prototype; // 初始化 _proto.init = function(){ // 球体 this.ball = ...

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

25. 发现bug,update大问题!!!!!!!!! 2.13版本 [ 98%]

...t: boolean = false;     constructor() {         super();         this.packageName = "Game";         this.resName = "Main";         this.isFullWindow = true;     }      /**      * 初始化组件 第一次new的时候执行      */     onConstruct() {     }      /*...

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

26. 加载-销毁Texture使用的图片资源 [ 98%]

...。 */ var GameMain = /** @class */ (function () { function GameMain() { this.isDestroyed = false; this.PathBg = "../../res/bg2.png"; this.PathFly = "../../res/fighter/fighter.atlas"; //初始化引擎 Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDL...

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

27. 鼠标交互-滑动 [ 98%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { this.createSprite(); this.drawTrack(); } createSprite() { const Sprite = Laya.Sprite, Event = Laya.Event; const w = 50; const h = 30; this.button = new Sprite(); this.button.graphics.drawRect(0, 0, w...

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

28. Image.loadImage 方法加载问题 [ 98%]

...同的图片 只能加载两个 但是三个同样的图片没问题     this.publicSpaceList = new Laya.List(); this.publicSpaceList.itemRender = gamepublicspaceitem.PublicSpaceItem; this.publicSpaceList.repeatX = 1; this.publicSpaceList.repeatY = 3; this.publicSpaceList.spaceY = 0; // this.publi...

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

29. 加载-销毁Texture使用的图片资源 [ 98%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.init(); } init() { const Sprite = Laya.Sprite, Animation = Laya.Animation, Text = Laya.Text, Event = Laya.Event; // 创建背景 this.spBg = Sprite.fromImage(PathBg); Laya.stage.addChild(this.spBg); // 创建动画 this....

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

30. 骨骼动画-换装 [ 98%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#ffffff"; Stat.show(); this.startFun(); } startFun() { const Templet = Laya.Templet, Event = Laya.Event; const mAniPath = "res/spine/spineRes2/goblins.sk"; mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, this.parseComplete); mFactory.on...

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