大约有 458 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0047 秒)
...stage.width; food.y = Math.random() * Laya.stage.height; } } class Segment extends Laya.Sprite { constructor(width, height) { super(); this.size(width, height); this.init(); } init() { this.graphics.drawRect(-this.height / 2, -this.height / 2, this.width + this.height, this.height, "#FF7F50"); } // ...
来源: Laya2.0_示例 发布时间: 20251130
...Laya.Sprite; import MovieClip=Laya.MovieClip; export class SpriteSheetTest extends Sprite{ constructor() { super(); let mc:MovieClip=new MovieClip(); } } 就这点代码,运行后就报错 2017-07-19 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被...
来源: Laya_社区 发布时间: 20170718
... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.ProgressBar }) public progressBar: Laya.ProgressBar; @property({ type: Laya.Text }) public loadText: Laya.Text; //组件被激活后执行,此时所有节点和组件均已创建...
来源: Laya3.0_文档 发布时间: 20251010
...3); input.inputElementYAdjuster = 1; return input } } class ListItemRender extends Laya.Box { constructor() { super(); const Label = Laya.Label; this.size(100, 20); this.label = new Label(); this.label.fontSize = 12; this.label.color = "#FFFFFF"; this.addChild(this.label); } setLabel(value) { this.l...
来源: Laya2.0_示例 发布时间: 20251130
...片大小为640*1038,900K 先创建一个img实例 class bitmapimg extends Laya.Image //2.0版本 这里区别为export default class bitmap extends Laya.Image { private szurl:string="" constructor(url:string){ super() this.onUrlChangeHandler(url); } protected onUrlChangeHandler(url:string):v...
来源: Laya_社区 发布时间: 20181201
... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type : Laya.Sprite}) public spr: Laya.Sprite; onAwake(): void { this.spr.size(512, 313); //设置Sprite大小 this.spr.loadImage("atlas/comp/image.png"); //添加纹理 } } 效果如图1-2所...
来源: Laya3.0_文档 发布时间: 20251010
... * @author xiaozhibin */ public class HelloLayaBox extends Sprite { public function HelloLayaBox() { Laya.init(600, 300); var txt:Text = new Text(); txt.text = "HelloLayaBox"; ...
来源: Laya_社区 发布时间: 20171025
... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { let opendata = new...
来源: Laya3.0_文档 发布时间: 20251010
...st { regClass, property } = Laya; @regClass() export class TextAreaControl extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type : Laya.TextArea } ) public txtarea: Laya.TextArea; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建...
来源: Laya3.0_文档 发布时间: 20251010
...{ regClass, property } = Laya; @regClass() export default class DirectMove extends Laya.Script { declare owner: Laya.Sprite3D; private characterController: Laya.CharacterController; onAwake(): void { // 获取 角色控制器 组件并赋值给 characterController this.characterController = this.own...
来源: Laya3.0_文档 发布时间: 20251010