layaair-example
53
examples/layaair/frontend/laya/.laya
Normal file
@@ -0,0 +1,53 @@
|
||||
<project version="2.0">
|
||||
<asynRes>img,temp,sound </asynRes>
|
||||
<unDealRes>embed </unDealRes>
|
||||
<resTypes>png,jpg </resTypes>
|
||||
<resExportPath>bin/res/atlas </resExportPath>
|
||||
<asynResExportPath>bin </asynResExportPath>
|
||||
<codeExportPath>src/ui </codeExportPath>
|
||||
<codeImports><![CDATA[import laya.ui.*;]]> </codeImports>
|
||||
<codeImportsJS><![CDATA[var View=laya.ui.View;
|
||||
var Dialog=laya.ui.Dialog;]]> </codeImportsJS>
|
||||
<uiType>3 </uiType>
|
||||
<uiExportPath>bin/ui.json </uiExportPath>
|
||||
<boxTypes>Sprite,Box,List,Tab,RadioGroup,ViewStack,Panel,HBox,VBox,Tree </boxTypes>
|
||||
<pageTypes>Scene,View,Dialog </pageTypes>
|
||||
<shareResPath/>
|
||||
<codeType>1 </codeType>
|
||||
<resCanCompress/>
|
||||
<resPublishQuality>80 </resPublishQuality>
|
||||
<langPath/>
|
||||
<defaultFont/>
|
||||
<codeImportsTS><![CDATA[import View=Laya.View;
|
||||
import Dialog=Laya.Dialog;
|
||||
import Scene=Laya.Scene;]]> </codeImportsTS>
|
||||
<textureWidth>2048 </textureWidth>
|
||||
<textureHeight>2048 </textureHeight>
|
||||
<picWidth>512 </picWidth>
|
||||
<picHeight>512 </picHeight>
|
||||
<power2>false </power2>
|
||||
<trimempty>true </trimempty>
|
||||
<startScene/>
|
||||
<engineType>2D </engineType>
|
||||
<scaleMode>fixedwidth </scaleMode>
|
||||
<screenMode>none </screenMode>
|
||||
<alignV>top </alignV>
|
||||
<alignH>left </alignH>
|
||||
<designWidth>640 </designWidth>
|
||||
<designHeight>1136 </designHeight>
|
||||
<codeViewExportPath>src/view </codeViewExportPath>
|
||||
<picType>0 </picType>
|
||||
<atlasType>1 </atlasType>
|
||||
<atlasScale/>
|
||||
<debugMode>false </debugMode>
|
||||
<copyRes>true </copyRes>
|
||||
<dataCompact>true </dataCompact>
|
||||
<isRemoteProject>false </isRemoteProject>
|
||||
<idePath/>
|
||||
<ver>2.0 </ver>
|
||||
<stat>false </stat>
|
||||
<physicsDebug>false </physicsDebug>
|
||||
<toJsonScene>true </toJsonScene>
|
||||
<compressTexture>false </compressTexture>
|
||||
<libProjectPath/>
|
||||
</project>
|
BIN
examples/layaair/frontend/laya/assets/comp/btn_close.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/button.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/check_circle.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/checkbox.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/clip_num.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/clip_tree_arrow.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/clip_tree_folder.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/colorPicker.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/combobox.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/fontClip.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/fontClip_num.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/hscroll$bar.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/hscroll$down.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/hscroll$up.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/hscroll.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/hslider$bar.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/hslider.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/html.png
Normal file
After Width: | Height: | Size: 921 B |
BIN
examples/layaair/frontend/laya/assets/comp/image.png
Normal file
After Width: | Height: | Size: 221 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/img_bg.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/img_bg2.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/img_bg3.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/img_bg4.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/img_bg5.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/img_blank.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/label.png
Normal file
After Width: | Height: | Size: 921 B |
BIN
examples/layaair/frontend/laya/assets/comp/progress$bar.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/progress.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/radio.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/radiogroup.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/tab.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/textarea.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/textinput.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/vscroll$bar.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/vscroll$down.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/vscroll$up.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/vscroll.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/vslider$bar.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
examples/layaair/frontend/laya/assets/comp/vslider.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
examples/layaair/frontend/laya/assets/sound/destroy.wav
Normal file
BIN
examples/layaair/frontend/laya/assets/sound/hit.wav
Normal file
BIN
examples/layaair/frontend/laya/assets/test/b1.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
examples/layaair/frontend/laya/assets/test/b2.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
examples/layaair/frontend/laya/assets/test/block.png
Normal file
After Width: | Height: | Size: 939 B |
BIN
examples/layaair/frontend/laya/assets/test/c1.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
examples/layaair/frontend/laya/assets/test/c2.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
examples/layaair/frontend/laya/assets/test/p1.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
examples/layaair/frontend/laya/assets/test/t1.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
examples/layaair/frontend/laya/assets/test/tra.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
1
examples/layaair/frontend/laya/ignore.cfg
Normal file
@@ -0,0 +1 @@
|
||||
{"src/Main.ts":true,"src/GameConfig.ts":true,"src/ui":true}
|
3
examples/layaair/frontend/laya/pageStyles.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<page>
|
||||
<item name="test/TestScene.scene" props="" ifExport="分离模式" aName=""/>
|
||||
</page>
|
71
examples/layaair/frontend/laya/pages/prefab/Bullet.prefab
Normal file
@@ -0,0 +1,71 @@
|
||||
{
|
||||
"x":0,
|
||||
"type":"Sprite",
|
||||
"selectedBox":1,
|
||||
"selecteID":5,
|
||||
"referenceLines":null,
|
||||
"props":{"y":0,"x":0,"texture":"test/c2.png","presetID":1,"preset":"laya/pages/prefab/Bullet.prefab","name":"buttle","isPresetRoot":true,"group":-2},
|
||||
"nodeParent":-1,
|
||||
"label":"buttle",
|
||||
"isOpen":true,
|
||||
"isDirectory":true,
|
||||
"isAniNode":true,
|
||||
"hasChild":true,
|
||||
"compId":1,
|
||||
"child":[
|
||||
{
|
||||
"x":15,
|
||||
"type":"CircleCollider",
|
||||
"switchAble":true,
|
||||
"removeAble":true,
|
||||
"props":{"radius":15,"presetID":2,"preset":"laya/pages/prefab/Bullet.prefab","label":"buttle","isSensor":true},
|
||||
"nodeParent":1,
|
||||
"label":"CircleCollider(Bullet)",
|
||||
"isDirectory":false,
|
||||
"isAniNode":true,
|
||||
"hasChild":false,
|
||||
"compId":2,
|
||||
"child":[
|
||||
]
|
||||
},
|
||||
{
|
||||
"x":15,
|
||||
"type":"RigidBody",
|
||||
"switchAble":true,
|
||||
"removeAble":true,
|
||||
"props":{"type":"kinematic","presetID":3,"preset":"laya/pages/prefab/Bullet.prefab","group":-2},
|
||||
"nodeParent":1,
|
||||
"label":"RigidBody(Bullet)",
|
||||
"isDirectory":false,
|
||||
"isAniNode":true,
|
||||
"hasChild":false,
|
||||
"compId":3,
|
||||
"child":[
|
||||
]
|
||||
},
|
||||
{
|
||||
"x":15,
|
||||
"type":"Script",
|
||||
"switchAble":true,
|
||||
"source":"src/script/Bullet.ts",
|
||||
"removeAble":true,
|
||||
"props":{"presetID":4,"preset":"laya/pages/prefab/Bullet.prefab"},
|
||||
"nodeParent":1,
|
||||
"label":"Bullet",
|
||||
"isDirectory":false,
|
||||
"isAniNode":true,
|
||||
"hasChild":false,
|
||||
"compId":6,
|
||||
"child":[
|
||||
]
|
||||
}],
|
||||
"animations":[
|
||||
{
|
||||
"nodes":[
|
||||
],
|
||||
"name":"ani1",
|
||||
"id":1,
|
||||
"frameRate":24,
|
||||
"action":0
|
||||
}]
|
||||
}
|
85
examples/layaair/frontend/laya/pages/prefab/DropBox.prefab
Normal file
@@ -0,0 +1,85 @@
|
||||
{
|
||||
"x":0,
|
||||
"type":"Sprite",
|
||||
"selectedBox":1,
|
||||
"selecteID":8,
|
||||
"props":{"texture":"test/b1.png","presetID":1,"preset":"laya/pages/prefab/DropBox.prefab","pivotY":50,"pivotX":50,"name":"levelTxt","isPresetRoot":true,"group":1,"gravityScale":0.5},
|
||||
"nodeParent":-1,
|
||||
"label":"levelTxt",
|
||||
"isOpen":true,
|
||||
"isDirectory":true,
|
||||
"isAniNode":true,
|
||||
"hasChild":true,
|
||||
"compId":1,
|
||||
"child":[
|
||||
{
|
||||
"x":15,
|
||||
"type":"BoxCollider",
|
||||
"switchAble":true,
|
||||
"removeAble":true,
|
||||
"props":{"width":100,"presetID":2,"preset":"laya/pages/prefab/DropBox.prefab","height":100},
|
||||
"nodeParent":1,
|
||||
"label":"BoxCollider(DropBox)",
|
||||
"isDirectory":false,
|
||||
"isAniNode":true,
|
||||
"hasChild":false,
|
||||
"compId":2,
|
||||
"child":[
|
||||
]
|
||||
},
|
||||
{
|
||||
"x":15,
|
||||
"type":"RigidBody",
|
||||
"switchAble":true,
|
||||
"removeAble":true,
|
||||
"props":{"type":"dynamic","presetID":3,"preset":"laya/pages/prefab/DropBox.prefab","group":-1,"gravityScale":0.5},
|
||||
"nodeParent":1,
|
||||
"label":"RigidBody(DropBox)",
|
||||
"isDirectory":false,
|
||||
"isAniNode":true,
|
||||
"hasChild":false,
|
||||
"compId":3,
|
||||
"child":[
|
||||
]
|
||||
},
|
||||
{
|
||||
"x":15,
|
||||
"type":"Text",
|
||||
"props":{"y":0,"x":11.5,"width":77,"valign":"middle","text":"1","presetID":4,"preset":"laya/pages/prefab/DropBox.prefab","name":"levelTxt","height":100,"fontSize":100,"color":"#ffffff","align":"center"},
|
||||
"nodeParent":1,
|
||||
"label":"levelTxt",
|
||||
"isDirectory":false,
|
||||
"isAniNode":true,
|
||||
"hasChild":false,
|
||||
"compId":4,
|
||||
"child":[
|
||||
]
|
||||
},
|
||||
{
|
||||
"x":15,
|
||||
"type":"Script",
|
||||
"switchAble":true,
|
||||
"source":"src/script/DropBox.ts",
|
||||
"removeAble":true,
|
||||
"props":{"presetID":5,"preset":"laya/pages/prefab/DropBox.prefab"},
|
||||
"nodeParent":1,
|
||||
"label":"DropBox",
|
||||
"isDirectory":false,
|
||||
"isAniNode":true,
|
||||
"hasChild":false,
|
||||
"compId":9,
|
||||
"child":[
|
||||
]
|
||||
}],
|
||||
"animations":[
|
||||
{
|
||||
"nodes":[
|
||||
],
|
||||
"name":"ani1",
|
||||
"id":1,
|
||||
"frameRate":24,
|
||||
"events":[
|
||||
],
|
||||
"action":0
|
||||
}]
|
||||
}
|
620
examples/layaair/frontend/laya/pages/test/TestAni.ani
Normal file
@@ -0,0 +1,620 @@
|
||||
{
|
||||
"type":"View",
|
||||
"selectedBox":1,
|
||||
"selecteID":36,
|
||||
"referenceLines":null,
|
||||
"props":{"sceneWidth":600,"sceneHeight":400,"sceneColor":"#000000"},
|
||||
"nodeParent":-1,
|
||||
"label":"View",
|
||||
"isOpen":true,
|
||||
"isDirectory":true,
|
||||
"isAniNode":true,
|
||||
"hasChild":true,
|
||||
"compId":1,
|
||||
"child":[
|
||||
{
|
||||
"type":"GraphicNode",
|
||||
"props":{"y":0,"x":0,"width":20,"skin":"test/b1.png","pivotY":10,"pivotX":10,"height":20},
|
||||
"nodeParent":1,
|
||||
"label":"GraphicNode",
|
||||
"isDirectory":false,
|
||||
"isAniNode":true,
|
||||
"hasChild":false,
|
||||
"compId":36,
|
||||
"child":[
|
||||
]
|
||||
},
|
||||
{
|
||||
"type":"GraphicNode",
|
||||
"props":{"y":20,"x":20,"width":20,"skin":"test/b1.png","pivotY":10,"pivotX":10,"height":20},
|
||||
"nodeParent":1,
|
||||
"label":"GraphicNode",
|
||||
"isDirectory":false,
|
||||
"isAniNode":true,
|
||||
"hasChild":false,
|
||||
"compId":37,
|
||||
"child":[
|
||||
]
|
||||
},
|
||||
{
|
||||
"type":"GraphicNode",
|
||||
"props":{"y":20,"x":0,"width":20,"skin":"test/b1.png","pivotY":10,"pivotX":10,"height":20},
|
||||
"nodeParent":1,
|
||||
"label":"GraphicNode",
|
||||
"isDirectory":false,
|
||||
"isAniNode":true,
|
||||
"hasChild":false,
|
||||
"compId":38,
|
||||
"child":[
|
||||
]
|
||||
},
|
||||
{
|
||||
"type":"GraphicNode",
|
||||
"props":{"y":20,"x":-20,"width":20,"skin":"test/b1.png","pivotY":10,"pivotX":10,"height":20},
|
||||
"nodeParent":1,
|
||||
"label":"GraphicNode",
|
||||
"isDirectory":false,
|
||||
"isAniNode":true,
|
||||
"hasChild":false,
|
||||
"compId":39,
|
||||
"child":[
|
||||
]
|
||||
},
|
||||
{
|
||||
"type":"GraphicNode",
|
||||
"props":{"y":0,"x":20,"width":20,"skin":"test/b1.png","pivotY":10,"pivotX":10,"height":20},
|
||||
"nodeParent":1,
|
||||
"label":"GraphicNode",
|
||||
"isDirectory":false,
|
||||
"isAniNode":true,
|
||||
"hasChild":false,
|
||||
"compId":40,
|
||||
"child":[
|
||||
]
|
||||
},
|
||||
{
|
||||
"type":"GraphicNode",
|
||||
"props":{"y":0,"x":-20,"width":20,"skin":"test/b1.png","pivotY":10,"pivotX":10,"height":20},
|
||||
"nodeParent":1,
|
||||
"label":"GraphicNode",
|
||||
"isDirectory":false,
|
||||
"isAniNode":true,
|
||||
"hasChild":false,
|
||||
"compId":41,
|
||||
"child":[
|
||||
]
|
||||
},
|
||||
{
|
||||
"type":"GraphicNode",
|
||||
"props":{"y":-20,"x":20,"width":20,"skin":"test/b1.png","pivotY":10,"pivotX":10,"height":20},
|
||||
"nodeParent":1,
|
||||
"label":"GraphicNode",
|
||||
"isDirectory":false,
|
||||
"isAniNode":true,
|
||||
"hasChild":false,
|
||||
"compId":42,
|
||||
"child":[
|
||||
]
|
||||
},
|
||||
{
|
||||
"type":"GraphicNode",
|
||||
"props":{"y":-20,"x":0,"width":20,"skin":"test/b1.png","pivotY":10,"pivotX":10,"height":20},
|
||||
"nodeParent":1,
|
||||
"label":"GraphicNode",
|
||||
"isDirectory":false,
|
||||
"isAniNode":true,
|
||||
"hasChild":false,
|
||||
"compId":43,
|
||||
"child":[
|
||||
]
|
||||
},
|
||||
{
|
||||
"type":"GraphicNode",
|
||||
"props":{"y":-20,"x":-20,"width":20,"skin":"test/b1.png","pivotY":10,"pivotX":10,"height":20},
|
||||
"nodeParent":1,
|
||||
"label":"GraphicNode",
|
||||
"isDirectory":false,
|
||||
"isAniNode":true,
|
||||
"hasChild":false,
|
||||
"compId":44,
|
||||
"child":[
|
||||
]
|
||||
}],
|
||||
"animations":[
|
||||
{
|
||||
"nodes":[
|
||||
{
|
||||
"target":36,
|
||||
"keyframes":{
|
||||
"y":[
|
||||
{
|
||||
"value":0,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":36,
|
||||
"key":"y",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":-30,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":36,
|
||||
"key":"y",
|
||||
"index":5
|
||||
}],
|
||||
"x":[
|
||||
{
|
||||
"value":0,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":36,
|
||||
"key":"x",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":-165,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":36,
|
||||
"key":"x",
|
||||
"index":5
|
||||
}],
|
||||
"alpha":[
|
||||
{
|
||||
"value":1,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":36,
|
||||
"key":"alpha",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":0.2,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":36,
|
||||
"key":"alpha",
|
||||
"index":5
|
||||
}]
|
||||
}
|
||||
},
|
||||
{
|
||||
"target":37,
|
||||
"keyframes":{
|
||||
"y":[
|
||||
{
|
||||
"value":20,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":37,
|
||||
"key":"y",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":30,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":37,
|
||||
"key":"y",
|
||||
"index":5
|
||||
}],
|
||||
"x":[
|
||||
{
|
||||
"value":20,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":37,
|
||||
"key":"x",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":155,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":37,
|
||||
"key":"x",
|
||||
"index":5
|
||||
}],
|
||||
"alpha":[
|
||||
{
|
||||
"value":1,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":37,
|
||||
"key":"alpha",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":0.7,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":37,
|
||||
"key":"alpha",
|
||||
"index":5
|
||||
}]
|
||||
}
|
||||
},
|
||||
{
|
||||
"target":38,
|
||||
"keyframes":{
|
||||
"y":[
|
||||
{
|
||||
"value":20,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":38,
|
||||
"key":"y",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":116,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":38,
|
||||
"key":"y",
|
||||
"index":5
|
||||
}],
|
||||
"x":[
|
||||
{
|
||||
"value":0,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":38,
|
||||
"key":"x",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":73,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":38,
|
||||
"key":"x",
|
||||
"index":5
|
||||
}],
|
||||
"alpha":[
|
||||
{
|
||||
"value":1,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":38,
|
||||
"key":"alpha",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":0.2,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":38,
|
||||
"key":"alpha",
|
||||
"index":5
|
||||
}]
|
||||
}
|
||||
},
|
||||
{
|
||||
"target":39,
|
||||
"keyframes":{
|
||||
"y":[
|
||||
{
|
||||
"value":20,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":39,
|
||||
"key":"y",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":116,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":39,
|
||||
"key":"y",
|
||||
"index":5
|
||||
}],
|
||||
"x":[
|
||||
{
|
||||
"value":-20,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":39,
|
||||
"key":"x",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":-51,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":39,
|
||||
"key":"x",
|
||||
"index":5
|
||||
}],
|
||||
"alpha":[
|
||||
{
|
||||
"value":1,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":39,
|
||||
"key":"alpha",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":0.4,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":39,
|
||||
"key":"alpha",
|
||||
"index":5
|
||||
}]
|
||||
}
|
||||
},
|
||||
{
|
||||
"target":40,
|
||||
"keyframes":{
|
||||
"y":[
|
||||
{
|
||||
"value":0,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":40,
|
||||
"key":"y",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":-79,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":40,
|
||||
"key":"y",
|
||||
"index":5
|
||||
}],
|
||||
"x":[
|
||||
{
|
||||
"value":20,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":40,
|
||||
"key":"x",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":124,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":40,
|
||||
"key":"x",
|
||||
"index":5
|
||||
}],
|
||||
"alpha":[
|
||||
{
|
||||
"value":1,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":40,
|
||||
"key":"alpha",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":0.3,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":40,
|
||||
"key":"alpha",
|
||||
"index":5
|
||||
}]
|
||||
}
|
||||
},
|
||||
{
|
||||
"target":41,
|
||||
"keyframes":{
|
||||
"y":[
|
||||
{
|
||||
"value":0,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":41,
|
||||
"key":"y",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":71,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":41,
|
||||
"key":"y",
|
||||
"index":5
|
||||
}],
|
||||
"x":[
|
||||
{
|
||||
"value":-20,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":41,
|
||||
"key":"x",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":-111,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":41,
|
||||
"key":"x",
|
||||
"index":5
|
||||
}],
|
||||
"alpha":[
|
||||
{
|
||||
"value":1,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":41,
|
||||
"key":"alpha",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":0.6,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":41,
|
||||
"key":"alpha",
|
||||
"index":5
|
||||
}]
|
||||
}
|
||||
},
|
||||
{
|
||||
"target":42,
|
||||
"keyframes":{
|
||||
"y":[
|
||||
{
|
||||
"value":-20,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":42,
|
||||
"key":"y",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":-49,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":42,
|
||||
"key":"y",
|
||||
"index":5
|
||||
}],
|
||||
"x":[
|
||||
{
|
||||
"value":20,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":42,
|
||||
"key":"x",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":53,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":42,
|
||||
"key":"x",
|
||||
"index":5
|
||||
}],
|
||||
"alpha":[
|
||||
{
|
||||
"value":1,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":42,
|
||||
"key":"alpha",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":0,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":42,
|
||||
"key":"alpha",
|
||||
"index":5
|
||||
}]
|
||||
}
|
||||
},
|
||||
{
|
||||
"target":43,
|
||||
"keyframes":{
|
||||
"y":[
|
||||
{
|
||||
"value":-20,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":43,
|
||||
"key":"y",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":-136,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":43,
|
||||
"key":"y",
|
||||
"index":5
|
||||
}],
|
||||
"alpha":[
|
||||
{
|
||||
"value":1,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":43,
|
||||
"key":"alpha",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":0.2,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":43,
|
||||
"key":"alpha",
|
||||
"index":5
|
||||
}]
|
||||
}
|
||||
},
|
||||
{
|
||||
"target":44,
|
||||
"keyframes":{
|
||||
"y":[
|
||||
{
|
||||
"value":-20,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":44,
|
||||
"key":"y",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":-69,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":44,
|
||||
"key":"y",
|
||||
"index":5
|
||||
}],
|
||||
"x":[
|
||||
{
|
||||
"value":-20,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":44,
|
||||
"key":"x",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":-91,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":44,
|
||||
"key":"x",
|
||||
"index":5
|
||||
}],
|
||||
"alpha":[
|
||||
{
|
||||
"value":1,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":44,
|
||||
"key":"alpha",
|
||||
"index":0
|
||||
},
|
||||
{
|
||||
"value":0.5,
|
||||
"tweenMethod":"linearNone",
|
||||
"tween":true,
|
||||
"target":44,
|
||||
"key":"alpha",
|
||||
"index":5
|
||||
}]
|
||||
}
|
||||
}],
|
||||
"name":"ani1",
|
||||
"id":1,
|
||||
"frameRate":30,
|
||||
"events":[
|
||||
],
|
||||
"action":0
|
||||
}]
|
||||
}
|
140
examples/layaair/frontend/laya/pages/test/TestScene.scene
Normal file
@@ -0,0 +1,140 @@
|
||||
{
|
||||
"x":0,
|
||||
"type":"Scene",
|
||||
"selectedBox":1,
|
||||
"searchKey":"Scene,gameBox",
|
||||
"referenceLines":null,
|
||||
"props":{"width":640,"sceneColor":"#000000","runtime":"script/GameUI.ts","name":"gameBox","height":1136},
|
||||
"nodeParent":-1,
|
||||
"maxID":21,
|
||||
"label":"gameBox",
|
||||
"isOpen":true,
|
||||
"isDirectory":true,
|
||||
"isAniNode":true,
|
||||
"hasChild":true,
|
||||
"compId":1,
|
||||
"child":[
|
||||
{
|
||||
"x":15,
|
||||
"type":"Sprite",
|
||||
"searchKey":"Sprite,ground",
|
||||
"props":{"y":1116,"x":-83,"width":805,"texture":"test/block.png","name":"ground","height":20},
|
||||
"nodeParent":1,
|
||||
"label":"ground",
|
||||
"isOpen":false,
|
||||
"isDirectory":true,
|
||||
"isAniNode":true,
|
||||
"hasChild":true,
|
||||
"compId":3,
|
||||
"child":[
|
||||
{
|
||||
"type":"BoxCollider",
|
||||
"searchKey":"BoxCollider",
|
||||
"props":{"y":0,"x":0,"width":805,"label":"ground","height":20},
|
||||
"nodeParent":3,
|
||||
"label":"BoxCollider",
|
||||
"isDirectory":false,
|
||||
"isAniNode":true,
|
||||
"hasChild":false,
|
||||
"compId":5,
|
||||
"child":[
|
||||
]
|
||||
},
|
||||
{
|
||||
"type":"RigidBody",
|
||||
"searchKey":"RigidBody",
|
||||
"props":{"type":"static"},
|
||||
"nodeParent":3,
|
||||
"label":"RigidBody",
|
||||
"isDirectory":false,
|
||||
"isAniNode":true,
|
||||
"hasChild":false,
|
||||
"compId":6,
|
||||
"child":[
|
||||
]
|
||||
}]
|
||||
},
|
||||
{
|
||||
"x":15,
|
||||
"type":"Sprite",
|
||||
"searchKey":"Sprite,gameBox",
|
||||
"props":{"y":0,"x":0,"name":"gameBox"},
|
||||
"nodeParent":1,
|
||||
"label":"gameBox",
|
||||
"isDirectory":false,
|
||||
"isAniNode":true,
|
||||
"hasChild":false,
|
||||
"compId":18,
|
||||
"child":[
|
||||
]
|
||||
},
|
||||
{
|
||||
"x":15,
|
||||
"type":"Sprite",
|
||||
"searchKey":"Sprite,UI",
|
||||
"props":{"y":0,"x":0,"name":"UI"},
|
||||
"nodeParent":1,
|
||||
"label":"UI",
|
||||
"isOpen":true,
|
||||
"isDirectory":true,
|
||||
"isAniNode":true,
|
||||
"hasChild":true,
|
||||
"compId":14,
|
||||
"child":[
|
||||
{
|
||||
"x":30,
|
||||
"type":"Label",
|
||||
"searchKey":"Label,scoreLbl",
|
||||
"props":{"y":50,"x":158,"width":272,"var":"scoreLbl","height":47,"fontSize":40,"color":"#51c524","align":"center"},
|
||||
"nodeParent":14,
|
||||
"label":"scoreLbl",
|
||||
"isDirectory":false,
|
||||
"isAniNode":true,
|
||||
"hasChild":false,
|
||||
"compId":17,
|
||||
"child":[
|
||||
]
|
||||
},
|
||||
{
|
||||
"x":30,
|
||||
"type":"Label",
|
||||
"searchKey":"Label,tipLbll",
|
||||
"props":{"y":0,"x":0,"width":640,"var":"tipLbll","valign":"middle","text":"别让箱子掉下来\\n\\n点击屏幕开始游戏","height":1136,"fontSize":40,"color":"#c6302e","align":"center"},
|
||||
"nodeParent":14,
|
||||
"label":"tipLbll",
|
||||
"isDirectory":false,
|
||||
"isAniNode":true,
|
||||
"hasChild":false,
|
||||
"compId":16,
|
||||
"child":[
|
||||
]
|
||||
}]
|
||||
},
|
||||
{
|
||||
"x":15,
|
||||
"type":"Script",
|
||||
"switchAble":true,
|
||||
"source":"src/script/GameControl.ts",
|
||||
"searchKey":"Script,GameControl",
|
||||
"removeAble":true,
|
||||
"props":{"enabled":true,"dropBox":"@Prefab:prefab/DropBox.prefab","bullet":"@Prefab:prefab/Bullet.prefab"},
|
||||
"nodeParent":1,
|
||||
"label":"GameControl",
|
||||
"isDirectory":false,
|
||||
"isClose":false,
|
||||
"isAniNode":true,
|
||||
"hasChild":false,
|
||||
"compId":20,
|
||||
"child":[
|
||||
]
|
||||
}],
|
||||
"animations":[
|
||||
{
|
||||
"nodes":[
|
||||
],
|
||||
"name":"ani1",
|
||||
"id":1,
|
||||
"frameRate":24,
|
||||
"action":0
|
||||
}]
|
||||
}
|