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

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

1. 如何启用摇一摇 [ 100%]

...ontroller { import model.Model; /** * ... * @author 偷心枫贼 */ public class Controller_yao1yao { public function Controller_yao1yao(model:Model) { __JS__('_model = model'); __JS__('var SHAKE_THRESHOLD = 100'); __JS__('var last_update = 0'); __JS__('var x = y = z = last_x = last_y = last_z = 0;'...

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

2. 请大家帮助优化一下这个抛物线的代码 [ 98%]

...码  希望大家指正 https://my.oschina.net/u/659068/blog/1564002  class Ball extends Laya.Sprite{ private static 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(); th...

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

3. 微信小游戏提审后,提示说代码侵权 [ 95%]

...各位读者收获满满!混淆代码的思路: 1、修改所有代码Class 类名称不要重复 2、修改全部全局属性、和至少 1/3的方法名称不要重复(这部分可以写程序去批量改) 3、打乱那些基类、工具类里面的方法顺序, 举例 Class A里面有 F...

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

4. 加载TiledMap 不显示 [ 90%]

... import Handler = Laya.Handler; import WebGL = Laya.WebGL;  export class TiledMap_IsometricWorld {     private tiledMap: TiledMap;     private layer: MapLayer;     private sprite: Sprite;      constructor ()     {         // 不支持WebGL时自动切换...

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

5. 在开启webgl模式下,每次运行texture类的getPixels方法内存都会增加 [ 90%]

....Sprite import Texture = Laya.Texture import Handler = Laya.Handler export class MaskDemo { private Res: string; private img: Laya.Image; constructor() { //Laya.init(400, 640, Laya.WebGL); //设置舞台背景色 Laya.stage.bgColor = "#ffffff" Laya.Stat.show() //资源路径 this.Res = "test.png"; t...

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

6. 分享:LayaAir实现曲线运动 [ 90%]

...,具体demo已上传附件 package { import laya.display.Sprite; public class CurveDemo { private var ball:Sprite; private var xflag:Boolean; private var v:uint=2; private var d:uint=150; public function CurveDemo() { Laya.init(800,400); ball=new Sprite(); ball.graphics.drawCircle(0,0,50,"#FF00FF...

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

7. 十几秒以后动画渲染时间变长,帧率变慢,是怎么回事? [ 90%]

...*************************************************************************/ class DollGunRole extends GunRole{  public _box: GunBox; // toset: /** 飞行的范围, 用于计算飞行路径 */ private _fly_site:Site = new SiteEntity( 10, 10, -1, 400 );  public static _ani_cached:boolean = false;  /...

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

8. ScrollRect设置会引起其他的UI资源无法正在显示 [ 88%]

...ort laya.ui.Image; import laya.utils.Handler; import ui.TestViewUI; public class TestView extends TestViewUI { private var PATH_LEN:Number = 120.0; private var speed:Number = 15; private var _path:Sprite = new Sprite(); private var arr:Array = []; public function TestView() { super(); _path.pivot(0,...

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

9. 引擎 TiledMap 居然不支持图块翻转 [ 88%]

...73741824;     const TiledMapFlipConstHalf = TiledMapFlipConst / 2;     class GridSprite extends Laya.Sprite {         constructor() {             super(...arguments);             this.relativeX = 0;             this.relativeY = 0;             this.isAloneObject = fals...

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

10. 【简单跑酷--JS版】---Lv.3 添加地板 [ 86%]

....__super.call(this); } //Floor 是一个显示对象 继承此 Sprite Laya.class(Floor, "Floor", laya.display.Sprite); var _proto = Floor.prototype; _proto.init = function(type){ //创建一个帧循环处理函数 Laya.timer.frameLoop(1, this, this.onLoop); } //在地板上面添加物品 _proto.ad...

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