大约有 444 项符合查询结果, 库内数据总量为 30,975 项。 (搜索耗时: 0.0040 秒)
...mationDefine from "../AnimationDefine"; export default class AttackState extends Laya.AnimatorStateScript { animator:Laya.Animator; onStateEnter(): void { } onStateExit(): void { if(this.animator) { this.animator.crossFade(AnimationDefine.IDLE,0.5,0,0); } } onStateUpdate(): void { } }...
来源: Laya_社区 发布时间: 20181109
...是以文本宽度来显示的 示例代码export default class HtmlTest extends Laya.Sprite { constructor() { super(); this.init(); } init() { this.bg = new Laya.Sprite(); this.bg.graphics.drawRect(0, 0, 200, 200, '#ccc'); this.addChild(this.bg); this.htmlTxt = new Laya.HTMLDivElement(); this.htmlT...
来源: Laya_社区 发布时间: 20210107
...———————————————— public class MainActivity extends Activity{ private IPlugin mPlugin = null; private IPluginRuntimeProxy mProxy = null; boolean isLoad=false; boolean isExit=false; private WebView webView = null; private Acti...
来源: Laya_社区 发布时间: 20170517
...基类的组件,报错说未定义。 export default class GameLoading extends ui.gamoloadingUI{ constructor(){ super(); this.PB.changeHandler = new Laya.Handler(this,this.onChange); } } 基类中明确有PB变量,是进度条。此处构造函数中设置事件报错,说PB未定义,但是...
来源: Laya_社区 发布时间: 20181225
...on = Laya.ClassUtils.regClass; export module ui { export class MainSceneUI extends Laya.SceneBase { constructor(){ super()} createChildren():void { super.createChildren(); this.loadScene("MainScene"); } } REG("ui.MainSceneUI",MainSceneUI); } 期待生成SceneBase, 结果仍然生成Laya.SceneBase ...
来源: Laya_社区 发布时间: 20190418
... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { constructor() { super(); } onMouseClick(evt: Laya.Event): void { // 尝试获取当前位置 Laya.Geolocation.getCurrentPosition( Laya.Handler.create(this, this.onSuccess), Laya.Handler.create(this, this.o...
来源: Laya3.0_文档 发布时间: 20240910
...nHead { import laya.ui.*; import laya.display.*; public class MainHeadUI extends View { public var image1:Image; public var input:TextInput; public var combox:ComboBox; public var radio:RadioGroup; public var checkBox:CheckBox; public var gongji:Button; public var btn1HasLabel:Button; public stati...
来源: Laya_社区 发布时间: 20180327
... • 2018-10-25 14:56 写一个ts文件,写上 export default class Move extends Laya.Script{ /** @prop {name:target,tips:"目标容器",type:Prefab}*/ targetPrefab:Laya.Prefab; } 将文件在编辑模式下赋给点添加组件=》code=》move 然后创建一个box拖为预制体 放在...
来源: Laya_社区 发布时间: 20181025
... const { regClass, property } = Laya; @regClass() export class Animation extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Animation }) //在IDE面板中显示属性 ani: Laya.Animation; constructor() { super(); } //组件被激活后执行,此时所有节点和组件...
来源: Laya3.0_文档 发布时间: 20240910
...本。 > **脚本类**: ```typescript export default class MouseScript extends Laya.Script3D{ private meshsp:Laya.MeshSprite3D; constructor(){super();} /** * 覆写3D对象组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(){ this.meshsp ...
来源: Laya2.0_文档 发布时间: 20210715