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

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

291. 网络和格式-ProtocolBuffer [ 68%]

...Laya.Loader; import Browser = Laya.Browser; import Handler = Laya.Handler; export class Network_ProtocolBuffer { private ProtoBuf:any = Browser.window.protobuf; constructor() { Laya.init(550, 400); this.ProtoBuf.load("res/protobuf/user.proto", this.onAssetsLoaded); } private onAssetsLoaded(err:any, ...

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

292. Sprite-绘制各种形状 [ 67%]

...prite = Laya.Sprite; import Stage = Laya.Stage; import WebGL = Laya.WebGL; export class Sprite_DrawShapes { private sp: Sprite; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(740, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.s...

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

293. UI-Clip [ 67%]

...ge = Laya.Image; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export class UI_Clip { private buttonSkin: string = "../../res/ui/button-7.png"; private clipSkin: string = "../../res/ui/num0-9.png"; private bgSkin: string = "../../res/ui/coutDown.png"; private counter: Clip; private currF...

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

294. 缓动-缓动函数演示 [ 67%]

...dler = Laya.Handler; import Tween = Laya.Tween; import WebGL = Laya.WebGL; export class Tween_EaseFunctionsDemo { private character: Sprite; private duration: number = 2000; private tween: Tween; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV ...

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

295. 鼠标交互-修正交互区域 [ 67%]

...nt = Laya.Event; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Interaction_FixInteractiveRegion { private logger: Text; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDD...

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

296. laya2跨文件访问的问题 [ 67%]

...想的,认不认为这是个问题?以后还会添加不用写importexport的支持吗?   不管以后会不会支持,请问我现在就想像laya1那样,可以在不同文件随意写代码,也能互相访问到的话,能提供点思路或头绪不?   现在这情形,写几...

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

297. LayaAir 2.0 TS版编译出错GameConfig跟创建项目时生成的内容不一致了 [ 67%]

...let" import DropBox from "./script/DropBox" /* * 游戏初始化配置; */ export default class GameConfig{ static width:number=640; static height:number=1136; static scaleMode:string="fixedwidth"; static screenMode:string="none"; static startScene:string="test/TestScene.scene"; static sceneRoot:str...

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

298. Sprite-绘制各种形状 [ 67%]

...prite = Laya.Sprite; import Stage = Laya.Stage; import WebGL = Laya.WebGL; export class Sprite_DrawShapes { private sp: Sprite; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(740, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.s...

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

299. 输入设备-指南针 [ 67%]

...dler = Laya.Handler; import WebGL = Laya.WebGL; import Event = Laya.Event; export class InputDevice_Compasss { private compassImgPath:string = "../../res/inputDevice/kd.png"; private compassImg:Sprite; private degreesText:Text; private directionIndicator:Sprite; private firstTime:Boolean = true; con...

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

300. Laya3.0正式版spine3.8的动画资源不能正常显示 [ 67%]

...plet = Laya.SpineTemplet; const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { private skeleton: SpineSkeleton; private index: number = -1; public pageWidth: number; public pageHeight: number; onStart() { console.log("Game start"); Laya.loader.load("resources/res/...

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