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

大约有 2,033 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0063 秒)

161. 2D物理-桥 [ 93%]

...E让项目开发更高效。class Physics_Physics_Bridge { constructor() { this.ecount = 30; Laya.Config.isAntialias = true; Laya.Laya.init(1200, 700, Laya.WebGL); Laya.Stat.show(); Laya.Physics.enable(); Laya.PhysicsDebugDraw.enable(); Laya.Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE; Laya.Laya.sta...

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

162. UI-ScrollBar [ 93%]

...g", "../../res/ui/vscroll$up.png"); Laya.loader.load(skins, Handler.create(this, onSkinLoadComplete)); })(); function onSkinLoadComplete() { placeHScroller(); placeVScroller(); } function placeHScroller() { var hs = new HScrollBar(); hs.skin = "../../res/ui/hscroll.png"; hs.width = 300; hs.pos(50, 1...

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

163. Sprite-容器 [ 92%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.showApe(); } showApe() { const Sprite = Laya.Sprite; const layoutRadius = 150, radianUnit = Math.PI / 2; // 该容器用于装载4张猩猩图片 this.apesCon = new Sprite(); Laya.stage.addChild(this.apesCon); // 添加4...

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

164. CommandBuffer_Outline 每次 addCommandBuffer都会永久增加10Gpu,removed掉相机事件也不会减少 [ 92%]

...public static GetInstance(): CommandBuffer_Outline{         if(this.instance == null) this.instance = new CommandBuffer_Outline();         return this.instance;     }      public init(): void {         //使用之前必须先初始化          i...

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

165. 如何在游戏入口处获取对象的子对象 [ 92%]

...yer; var loadMap = (function (_super) { function loadMap() { loadMap.super(this); } Laya.class(loadMap,"loadMap",_super); var _proto = loadMap.prototype; _proto.init = function() { this.num = ""; this.map = new TiledMap(); } _proto.showMap = function(num) { this.num = num; this.map.createMap("map/le...

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

166. UI-ColorPicker [ 92%]

...ALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(skin, Handler.create(this, onColorPickerSkinLoaded)); })(); function onColorPickerSkinLoaded() { var colorPicker = new ColorPicker(); colorPicker.selectedColor = "#ff0033"; colorPicker.skin = skin; colorPicker.pos(100, 100); colorPicker.changeHan...

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

167. Sprite-节点控制 [ 92%]

... Laya.stage.addChild(ape1); ape1.addChild(ape2); Laya.timer.frameLoop(1, this, animate); } function animate(e) { ape1.rotation += 2; ape2.rotation -= 4; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Event = Laya.Event; import Browser = Laya.Browser; import WebGL...

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

168. 定义了var 但是this.xxx显示红色线 求指教 [ 92%]

定义了var 但是this.xxx显示红色线 求指教 2.0创建项目用js版本的话  非脚本模式的js代码里面能用this.xx的方式获取var变量 但是用ts脚本创建的方式this.xx(var变量)会提示红色线  无法编译通过  社区说的分离模式什么的我这边都试...

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

169. 关于这个timer我的跑的快在 自己出完牌之后没有人比我的牌大了。可是我的牌还是出不去 [ 92%]

...牌大了。可是我的牌还是出不去 computer() { Laya.timer.clear(this,this.computer); var NTS: number; var NTE: number; this.nextTurn; let i = this.turnNumber; if(i==0){ return; }  this.getPlayer(); }  gotoNext(){ this.turnNumber++; if(this.turnNumber>3) { this.turnNumber=0 } }  public...

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

170. 鼠标交互-滑动 [ 92%]

...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_示例 发布时间: 20251130