大约有 114 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0117 秒)
...import Box = Laya.Box; import Image = Laya.Image; class Item extends Box { public static WID: number = 373; public static HEI: number = 85; private img: Image; constructor(){ super(); this.size(Item.WID, Item.HEI); this.img = new Image(); this.addChild(this.img); } public setImg(src: string): void {...
来源: Laya2.0_示例 发布时间: 20251130
...t laya.physics.RigidBody; import laya.utils.Stat; import laya.webgl.WebGL; public class Physics_Physics_CollisionFiltering { public static const k_smallGroup = 1; public static const k_middleGroup = 0; public static const k_largeGroup = -1; public static const k_triangleCategory = 0x2; public static...
来源: Laya2.0_示例 发布时间: 20251130
...ort laya.utils.Stat; import laya.maths.Rectangle; import laya.webgl.WebGL; public class PerformanceTest_Maggots { private var texturePath:String = "../../res/tinyMaggot.png"; private var padding:int = 100; private var maggotAmount:int = 5000; private var tick:Number = 0; private var maggots:Array = ...
来源: Laya2.0_示例 发布时间: 20251130
...is.text.text = Stat.FPS.toString(); } } } class Character extends Sprite { public static WIDTH: number = 110; public static HEIGHT: number = 110; private speed: number = 5; private bloodBar: Sprite; private animation: Animation; private nameLabel: Text; constructor(images: Array) { super(); this.cre...
来源: Laya2.0_示例 发布时间: 20251130
...de.part", Handler.create(this, this.onAssetsLoaded), null, Loader.JSON); } public onAssetsLoaded(settings: ParticleSetting): void { this.sp = new Particle2D(settings); this.sp.emitter.start(); this.sp.play(); Laya.stage.addChild(this.sp); this.sp.x = Laya.stage.width / 2; this.sp.y = Laya.stage.heig...
来源: Laya2.0_示例 发布时间: 20251130
...de.part", Handler.create(this, this.onAssetsLoaded), null, Loader.JSON); } public onAssetsLoaded(settings: ParticleSetting): void { this.sp = new Particle2D(settings); this.sp.emitter.start(); this.sp.play(); Laya.stage.addChild(this.sp); this.sp.x = Laya.stage.width / 2; this.sp.y = Laya.stage.heig...
来源: Laya2.0_示例 发布时间: 20251130
...ew.part", Handler.create(this, this.onAssetsLoaded), null, Loader.JSON); } public onAssetsLoaded(settings: ParticleSetting): void { this.sp = new Particle2D(settings); this.sp.emitter.start(); this.sp.play(); Laya.stage.addChild(this.sp); this.sp.x = Laya.stage.width / 2; this.sp.y = Laya.stage.heig...
来源: Laya2.0_示例 发布时间: 20251130
...r.height); Laya.stage.bgColor = "#ffffff"; Stat.show(); this.startFun(); } public startFun():void { this.mAniPath = "res/spine/spineRes1/dragon.sk"; this.mFactory = new Templet(); this.mFactory.on(Event.COMPLETE, this, this.parseComplete); this.mFactory.on(Event.ERROR, this, this.onError); this.mFac...
来源: Laya2.0_示例 发布时间: 20251130
...a.Tween; import WebGL = Laya.WebGL; export class Interaction_CustomEvent { public static ROTATE: string = "rotate"; private sp: Sprite; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya....
来源: Laya2.0_示例 发布时间: 20251130
....create(this, function(){ this.initView(); })); } /** 初始化场景 * */ public initView(): void{ // 加载并添加场景中需要使用的资源 this.baseBox = new Box(); this.baseBox.width = 443; this.baseBox.height = 622; this.baseBox.pos(30, 28); this.baseBox.bgColor = "#ffffff"; // 加载进...
来源: Laya2.0_示例 发布时间: 20251130