大约有 74 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0032 秒)
...触发(子弹进入物品时) * 此处当触发器进入时将脚本的owner(所属节点)第一个实例材质的漫反射颜色改为绿色 * 注:如相对移动速度过快,可能直接越过 */ public onTriggerEnter(other:Laya.PhysicsComponent):void { ((this.owner as Laya.MeshSprite3...
来源: Laya2.0_文档 发布时间: 20210715
...ublic function CameraMoveScript() { } override public function _initialize(owner:Sprite3D):void { super._initialize(owner); Laya.stage.on(Event.MOUSE_DOWN, this, mouseDown); Laya.stage.on(Event.MOUSE_UP, this, mouseUp); Laya.stage.on(Event.MOUSE_OUT, this, mouseOut); var camera:BaseCamera = owner.sc...
来源: Laya_社区 发布时间: 20170218
....display.Sprite; import laya.events.Event; public class Btn { private var _owner:Sprite; private var _isScal:Boolean; public function Btn() { trace("btn的附加类已经开始执行"); } //设置owner函数,可以直接获取到Button组件的实例 public function set owner(v:Sprite):void { _own...
来源: Laya_社区 发布时间: 20161014
...r() { console.log("加载ScaleButton"); } private _owner: any; public set owner(o: laya.display.Sprite) { this._owner = o; console.log("设置owner"); } public get owner(): laya.display.Sprite { return this._owner; }...
来源: Laya_社区 发布时间: 20170601
...---Script3D中的鼠标事件。如果想要使用鼠标脚本,在脚本owner上还是需要有物理碰撞器。 **Tips**:鼠标脚本依赖射线检测,只不过不用开放者自己手动创建射线了。 **鼠标脚本内容:** > Method `onMouseClick():void` 鼠标点击时执行 `onMou...
来源: Laya2.0_文档 发布时间: 20210715
...esult() physics:Laya.PhysicsSimulation; onAwake():void{ this.camera = this.owner.getChildByName("Main Camera") as Laya.Camera; let scene: Laya.Scene3D = this.owner.scene as Laya.Scene3D; this.physics=scene.physicsSimulation; console.log("相机位置",(this.owner.getChildByName("Main Camera...
来源: Laya_社区 发布时间: 20190621
...地面都设置了弹力 TestScript2 onAwake this.scene3D = this.owner as Scene3D; this.basketballCourt = this.scene3D.getChildByName("BasketballCourt") as Sprite3D; var collision:PhysicsCollider = this.basketballCourt.getChildByName("BasketballCourt1").getComponent(PhysicsCollider); collis...
来源: Laya_社区 发布时间: 20200512
... onTriggerEnter(e:Laya.RigidBody):void{ var cil:Laya.CircleCollider=this.owner.getComponent(Laya.CircleCollider); var rig:Laya.RigidBody=this.owner.getComponent(Laya.RigidBody); cil.enabled=false; rig.enabled=false; var self:Laya.Sprite= this.owner as Laya.Sprite; var ni:Laya.Animation=new Laya.An...
来源: Laya_社区 发布时间: 20190721
...地面都设置了弹力 TestScript2 onAwake this.scene3D = this.owner as Scene3D; this.basketballCourt = this.scene3D.getChildByName("BasketballCourt") as Sprite3D; var collision:PhysicsCollider = this.basketballCourt.getChildByName("BasketballCourt1").getComponent(PhysicsCollider); collis...
来源: Laya_社区 发布时间: 20200515
...RaycastHit(); } /*覆写3D组件方法,指3D对象加载组件时执行 *owner:此组件所属的3D对象 */ public _load(owner:Laya.Sprite3D):void{ //获取控制器UI this.rocker = Example_roleControl.rocker; this.attack = Example_roleControl.attack; } /*覆写加载组件的3D对象实例化...
来源: Laya_社区 发布时间: 20171113