大约有 2,023 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0067 秒)
Laya_社区(1419) Laya2.0_文档(233) Laya_示例(141) Laya2.0_示例(117) Laya3.0_api(61) Laya3.0_文档(39) Laya2.0_api(7) laya_api(6)
...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Event = Laya.Event; var gap = 10; //创建一个Sprite充当音效播放按钮 let soundButton = this.createButton("播放音效"); soundButton.x = (Laya.stage.width - soundButton.width * 2 + g...
来源: Laya2.0_示例 发布时间: 20241117
...舞台 Laya.stage.name = "暗灰色舞台" Laya.stage.on(Event.MOUSE_DOWN, this, onDown); } function createCoralRect() { var coralRect = new Sprite(); coralRect.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height / 2, "#FF7F50"); //设置名称 coralRect.name = "珊瑚色容器"; coralRect.s...
来源: Laya_示例 发布时间: 20241117
...i constructor() { super(); this.once(Laya.Event.DISPLAY, this, this.onCreate); this.once(Laya.Event.UNDISPLAY, this, this.onDestroy); } /** * 加入场景 */ protected on...
来源: Laya_社区 发布时间: 20181114
... cached:boolean = false; private body:Laya.Sprite; constructor(){ super(); this.init(); } public init():void{ if(!Ball.cached){ Ball.cached = true; this.body = new Laya.Sprite(); this.body.loadImage("war/ball.png"); this.body.pivot(12,12); } this.addChild(this.body); Laya.timer.frameLoop(1,this,this...
来源: Laya_社区 发布时间: 20171108
...ya.stage.width / 2; ape.y = Laya.stage.height / 2; Laya.timer.frameLoop(1, this, animate); } function animate(e) { ape.rotation += 2; //心跳缩放 scaleDelta += 0.02; var scaleValue = Math.sin(scaleDelta); ape.scale(scaleValue, scaleValue); } })();module laya { import Sprite = Laya.Sprite; import ...
来源: Laya_示例 发布时间: 20241117
...次都给我翻倍的增加,如何解决 _proto.room_xinxi=function(){ this.roombg=new Laya.Image($mj.Curr_Game_ImagePath + "hall/room_bg.png"); this.roombg.pos(50,150); this.addChild(this.roombg); var button = new Sprite(); button.loadImage($mj.Curr_Game_ImagePath + "hall/room_jiesan.png"); butto...
来源: Laya_社区 发布时间: 20170920
...meshFilter.sharedMesh; capsule.name = "胶囊体"; Laya.timer.frameLoop(1, this, checkHit); var ray = new Laya.Ray(new Laya.Vector3(0, 0, 0), new Laya.Vector3(0, 0, 0)); var point = new Laya.Vector2(); var _outHitAllInfo = new Array(); function checkHit() { //从屏幕空间生成射线 point.elemen...
来源: Laya_示例 发布时间: 20241117
... var Game = (function(){ (function Game(){ // 子弹发射偏移位置表 this.bulletPos = [[0],[-15,15],[-30,0,30],[-45,-15,15,45]]; // 关卡等级 this.level = 0; // 升级等级所需要的成绩数量 this.levelUpScore = 0; // 积分成绩 this.score = 0; // 子弹级别 this.bulletLevel = 0; ...
来源: Laya_社区 发布时间: 20170525
.../res/threeDimen/staticModel/LayaPlane/LayaPlane.lh" ], Laya.Handler.create(this, onComplete)); function onComplete() { setMaterials(scene.getChildByName("scene")); layaPlane.transform.localPosition = new Laya.Vector3(0, 0.5, -1); Laya.loader.load(["../../res/threeDimen/ui/button.png"], Laya.Handler....
来源: Laya_示例 发布时间: 20241117
...了 修改laya.d3.js _update方法为 _update() { var i=0,n=0,j=0,m=0; n=this._eventList.length; var cameras=this._scene._cameraPool; if (n > 0){ for (i=0;i < n;i++){ var e=this._eventList; switch (e.type){ case "mousedown": this._mouseTouchDown(); break ; case "mouseup": this._mouseTouchUp();...
来源: Laya_社区 发布时间: 20200119