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

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

341. LayaAir开发笔记(1)五十音图连连看 [ 82%]

...oadImage("linkgame_back.jpg"); background.cacheAsBitmap = true; Laya.stage.addChild(background); // 设定标题 var title = new laya.display.Text(); title.text = g_game_title; title.font = "Arial"; title.fontSize = 50; title.stroke = 2; title.strokeColor = "Black"; title.pos(g_stat_width / 2 - titl...

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

342. Laya.loader.load 教程代码出错 [ 82%]

...plated(e:*=null):void         {             Laya.stage.addChild(img);             img.on("click",this,OnImgClick);             OnImgClick();                          var txt:Text = new Text();             txt.text = "loa...

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

343. 缓动-时间线 [ 82%]

...Ape() { const Sprite = Laya.Sprite; this.target = new Sprite(); Laya.stage.addChild(this.target); this.target.loadImage("res/apes/monkey2.png"); this.target.pivot(55, 72); this.target.pos(100,100); } createTimerLine() { const TimeLine = Laya.TimeLine, Event = Laya.Event; this.timeLine = new TimeLine...

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

344. 为什么会出现报错 ani not found:ufo1_down [ 82%]

...悲剧 this.bg = new BackGround(); // 把背景添加到舞台 Laya.stage.addChild(this.bg); // 加载图集资源 Laya.loader.load("res/atlas/war.json",Laya.Handler.create(this,onLoaded),null,Laya.Loader.ATLAS); })(); function onLoaded(){ // 创建一个主角 this.hero = new Role(); // 初始化...

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

345. UI-Input [ 82%]

...Arial"; ti.fontSize = 30; ti.bold = true; ti.color = "#606368"; Laya.stage.addChild(ti); return ti; } } } new laya.UI_Input();package { import laya.display.Stage; import laya.ui.TextInput; import laya.utils.Handler; import laya.webgl.WebGL; public class UI_Input { private const SPACING:int = 100; pr...

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

346. UI-Input [ 82%]

...Arial"; ti.fontSize = 30; ti.bold = true; ti.color = "#606368"; Laya.stage.addChild(ti); return ti; } } } new laya.UI_Input();package { import laya.display.Stage; import laya.ui.TextInput; import laya.utils.Handler; import laya.webgl.WebGL; public class UI_Input { private const SPACING:int = 100; pr...

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

347. 文本对齐与自动换行(TypeScript-LayaAir基础篇(TS)-文本) [ 82%]

...n = "center"; //设置文本垂直居中 txt.valign = "middle"; Laya.stage.addChild(txt); } } } new laya.HelloLayabox(); ``` ![5](img/5.png) 在实际编码中如果需要其他的对齐模式,请参考API中的align和valign的取值,找到适合项目的水平对齐模式和垂直对齐模式...

来源: Laya2.0_文档 发布时间: 20210714

348. iphoneX环境下新手引导的抠图透明区域为黑色,其它机型都是正常的。 [ 82%]

...r = new Sprite(); this.guideContainer.cacheAs = "bitmap"; Utils.GuideLayer.addChild(this.guideContainer); this.guideContainer.on(Laya.Event.CLICK, this, this.nextStep); this.mouseEnabled = false; var maskArea: Laya.Sprite = new Laya.Sprite(); maskArea.alpha = 0.5; maskArea.graphics.drawRect(0, 0, La...

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

349. 关于切换图片的问题 [ 82%]

...); this.img = new Laya.Sprite; this.img.loadImage(this.plane1); Laya.stage.addChild(this.img); this.img.graphics.clear(); this.img.loadImage(this.plane2); Laya.stage.addChild(this.img) } } new Main(); 出来的结果是两张图合并到了一起, 于是我再尝试 constructor() { Laya.init(1000,...

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

350. 【LIST无法拖动】参照官方实例做的 [ 82%]

...   paihangbang.color="#ffffff";                   list.addChild(paihangbang);                  // 使用但隐藏滚动条         list.vScrollBarSkin = "";         list.selectEnable = true;         list.selectHandler = new Handler(...

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