大约有 420 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0039 秒)
... import laya.display.Sprite; import laya.events.Event; public class MainUi extends Sprite { private var testPan:Sprite; public function MainUi() { super(); this.graphics.drawRect(0,0,500,500,"#fff0cc"); testPan = new Sprite(); testPan.name = "testPan"; this.addChild( testPan ); testPan.pos( 300,300)...
来源: Laya_社区 发布时间: 20161124
... > 移动灯光脚本 ```typescript export default class LightMoveScript extends Laya.Script3D { //需要操作的光源数组 public lights = []; //光源对应的位置偏移数组 public offsets = []; //光源对应的移动半径数组 public moveRanges = []; public onUpdate(){ var seed = Laya.t...
来源: Laya2.0_文档 发布时间: 20210715
... > 移动灯光脚本 ```typescript export default class LightMoveScript extends Laya.Script3D { //需要操作的光源数组 public lights = []; //光源对应的位置偏移数组 public offsets = []; //光源对应的移动半径数组 public moveRanges = []; public onUpdate(){ var seed = Laya.t...
来源: Laya2.0_文档 发布时间: 20210715
...ents.KeyBoardManager; /** * ... * @author */ public class CameraMoveScript extends Script { protected var lastMouseX:Number; protected var lastMouseY:Number; protected var yawPitchRoll:Vector3 = new Vector3(); protected var resultRotation:Quaternion = new Quaternion(); protected var tempRotationZ:Qu...
来源: Laya_社区 发布时间: 20170218
...是IDE篇的。 我试着用代码实现物理效果class CollisionBoll extends Laya.Sprite { private _boll1:Laya.Sprite; constructor() { super(); //物理模块 this._boll1 = new Laya.Sprite(); this.addChild(this._boll1); this._boll1.x = 20; this._boll1.loadImage('comp/btn_close.png'); let box:l...
来源: Laya_社区 发布时间: 20190428
Laya2.7.1 射线提示rayCast未定义 export default class click3d extends Laya.Script3D{ constructor() { super(); //创建场景 this.scene = Laya.stage.addChild(new Laya.Scene3D()); //添加相机 this.camera = (this.scene.addChild(new Laya.Camera(0, 0.1, 100))); this.camera.transform.translate(...
来源: Laya_社区 发布时间: 20200801
...laya/ui/List"; import { Laya } from "laya"; export default class test_move extends Image{ // /** @prop {name:move_img, tips:"用来移动的箭头", type:Image} */ // public _move_img: Image; // public _list: List; //创建一个 List 类的实例对象 list 。 private n:number = 0; private x0:numb...
来源: Laya_社区 发布时间: 20200203
...脚本方式实现,比如子弹脚本。 */ export default class GameUI extends ui.test.TestSceneUI { constructor(){ super(); //加载场景 Laya.Scene3D.load('LayaScene_test/Conventional/test.ls',Laya.Handler.create(this,this.onComplete)); } /** * 加载完成 */ private onComplete(scene:Laya.Sce...
来源: Laya2.0_文档 发布时间: 20210714
...如下:附件是两个音频文件 export default class GameMain extends Laya.Scene { constructor() { super(); //设置单例的引用方式,方便其他类引用 GameMain.instance = this; //加载场景文...
来源: Laya_社区 发布时间: 20200925
...并且创建一个类。代码如下:module npc { export class BaseNPC extends Laya.Sprite { constructor() { super(); this.graphics.drawCircle(0, 0, 10, "#ff0000"); } } } 然后在我的主文件中import,并new出来。代码如下:import BaseNPC = npc.BaseNPC; var npcc:BaseNPC = new BaseN...
来源: Laya_社区 发布时间: 20180205