添加一个代码播放帧动画

This commit is contained in:
leo
2018-09-05 00:20:08 +08:00
parent 0f43ba520d
commit cae30aa351
27 changed files with 22185 additions and 0 deletions

67
FrameAnimDemo/.gitignore vendored Normal file
View File

@@ -0,0 +1,67 @@
#/////////////////////////////////////////////////////////////////////////////
# Fireball Projects
#/////////////////////////////////////////////////////////////////////////////
library/
temp/
local/
build/
#/////////////////////////////////////////////////////////////////////////////
# Logs and databases
#/////////////////////////////////////////////////////////////////////////////
*.log
*.sql
*.sqlite
#/////////////////////////////////////////////////////////////////////////////
# files for debugger
#/////////////////////////////////////////////////////////////////////////////
*.sln
*.csproj
*.pidb
*.unityproj
*.suo
#/////////////////////////////////////////////////////////////////////////////
# OS generated files
#/////////////////////////////////////////////////////////////////////////////
.DS_Store
ehthumbs.db
Thumbs.db
#/////////////////////////////////////////////////////////////////////////////
# exvim files
#/////////////////////////////////////////////////////////////////////////////
*UnityVS.meta
*.err
*.err.meta
*.exvim
*.exvim.meta
*.vimentry
*.vimentry.meta
*.vimproject
*.vimproject.meta
.vimfiles.*/
.exvim.*/
quick_gen_project_*_autogen.bat
quick_gen_project_*_autogen.bat.meta
quick_gen_project_*_autogen.sh
quick_gen_project_*_autogen.sh.meta
.exvim.app
#/////////////////////////////////////////////////////////////////////////////
# webstorm files
#/////////////////////////////////////////////////////////////////////////////
.idea/
#//////////////////////////
# VS Code
#//////////////////////////
.vscode/

2
FrameAnimDemo/README.md Normal file
View File

@@ -0,0 +1,2 @@
# hello-world
Hello world new project template.

View File

@@ -0,0 +1,6 @@
{
"ver": "1.0.1",
"uuid": "29f52784-2fca-467b-92e7-8fd9ef8c57b7",
"isGroup": false,
"subMetas": {}
}

View File

@@ -0,0 +1,568 @@
[
{
"__type__": "cc.SceneAsset",
"_name": "",
"_objFlags": 0,
"_native": "",
"scene": {
"__id__": 1
}
},
{
"__type__": "cc.Scene",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_level": 0,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_scale": {
"__type__": "cc.Vec3",
"x": 0.5532661939804838,
"y": 0.5532661939804838,
"z": 1
},
"_quat": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_zIndex": 0,
"groupIndex": 0,
"autoReleaseAssets": false,
"_id": "2d2f792f-a40c-49bb-a189-ed176a246e49"
},
{
"__type__": "cc.Node",
"_name": "Canvas",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 3
},
{
"__id__": 5
},
{
"__id__": 8
},
{
"__id__": 10
}
],
"_active": true,
"_level": 0,
"_components": [
{
"__id__": 13
},
{
"__id__": 14
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 252,
"g": 252,
"b": 252,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 960,
"height": 640
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_position": {
"__type__": "cc.Vec3",
"x": 480,
"y": 320,
"z": 0
},
"_scale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_rotationX": 0,
"_rotationY": 0,
"_quat": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_skewX": 0,
"_skewY": 0,
"_zIndex": 0,
"groupIndex": 0,
"_id": "a286bbGknJLZpRpxROV6M94"
},
{
"__type__": "cc.Node",
"_name": "Main Camera",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_level": 1,
"_components": [
{
"__id__": 4
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_position": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_scale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_rotationX": 0,
"_rotationY": 0,
"_quat": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_skewX": 0,
"_skewY": 0,
"_zIndex": 0,
"groupIndex": 0,
"_id": "78XyUanBRGqY60fFe7C/oU"
},
{
"__type__": "cc.Camera",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"_cullingMask": 4294967295,
"_clearFlags": 7,
"_backgroundColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_depth": -1,
"_zoomRatio": 1,
"_targetTexture": null,
"_id": "98cW5MeApOH5ltZPF53qPq"
},
{
"__type__": "cc.Node",
"_name": "background",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_level": 0,
"_components": [
{
"__id__": 6
},
{
"__id__": 7
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 27,
"g": 38,
"b": 46,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 960,
"height": 640
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_position": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_scale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_rotationX": 0,
"_rotationY": 0,
"_quat": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_skewX": 0,
"_skewY": 0,
"_zIndex": 0,
"groupIndex": 0,
"_id": "e2e0crkOLxGrpMxpbC4iQg1"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 200,
"_originalHeight": 150,
"_id": "778PwlbhZHCb8pCEBzrTxJ"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "410fb916-8721-4663-bab8-34397391ace7"
},
"_type": 1,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_state": 0,
"_atlas": null,
"_id": "33FhPkpJpHpZ+7vSubcFxh"
},
{
"__type__": "cc.Node",
"_name": "label",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_level": 0,
"_components": [
{
"__id__": 9
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 146.81,
"height": 60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_position": {
"__type__": "cc.Vec3",
"x": 0,
"y": -180,
"z": 0
},
"_scale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_rotationX": 0,
"_rotationY": 0,
"_quat": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_skewX": 0,
"_skewY": 0,
"_zIndex": 0,
"groupIndex": 0,
"_id": "31f1bH7V69Ajr1iXhluMpTB"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
},
"_enabled": true,
"_srcBlendFactor": 1,
"_dstBlendFactor": 771,
"_useOriginalSize": false,
"_string": "Label",
"_N$string": "Label",
"_fontSize": 60,
"_lineHeight": 60,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_id": "15BkOdeCxLCLWiRiUwQzS9"
},
{
"__type__": "cc.Node",
"_name": "role_level_000",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_level": 1,
"_components": [
{
"__id__": 11
},
{
"__id__": 12
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 92,
"height": 118
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_position": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_scale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_rotationX": 0,
"_rotationY": 0,
"_quat": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_skewX": 0,
"_skewY": 0,
"_zIndex": 0,
"groupIndex": 0,
"_id": "48KcaNF/ZI2JmAOIJxD5MB"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
},
"_enabled": true,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "47f65b31-6f3c-4fb9-ba5a-28e29040e203"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_state": 0,
"_atlas": {
"__uuid__": "5452e527-6bd4-4ff5-8ce8-e193dd63bcf0"
},
"_id": "aa6lHazwFAH54q7iwwB7Se"
},
{
"__type__": "0ee8cY9c3ZAbpQVLGg0Ixy4",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
},
"_enabled": true,
"spriteAtlas": {
"__uuid__": "5452e527-6bd4-4ff5-8ce8-e193dd63bcf0"
},
"isPlayAll": true,
"frameNameRoot": "role_level_0",
"frameCount": 15,
"timeInterval": 80,
"reqeatTime": 0,
"_id": "e8sN13z3pCtZfjjIJQq5qP"
},
{
"__type__": "cc.Canvas",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_designResolution": {
"__type__": "cc.Size",
"width": 960,
"height": 640
},
"_fitWidth": false,
"_fitHeight": true,
"_id": "72sDx3wElCwYOGT0f4f55v"
},
{
"__type__": "280c3rsZJJKnZ9RqbALVwtK",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"label": {
"__id__": 9
},
"text": "Hello, World!",
"_id": "7eAMRWNnxPb5LQIwr39oYf"
}
]

View File

@@ -0,0 +1,7 @@
{
"ver": "1.0.0",
"uuid": "2d2f792f-a40c-49bb-a189-ed176a246e49",
"asyncLoadAssets": false,
"autoReleaseAssets": false,
"subMetas": {}
}

View File

@@ -0,0 +1,6 @@
{
"ver": "1.0.1",
"uuid": "4734c20c-0db8-4eb2-92ea-e692f4d70934",
"isGroup": false,
"subMetas": {}
}

View File

@@ -0,0 +1,124 @@
cc.Class({
extends: cc.Component,
properties: {
spriteAtlas: cc.SpriteAtlas,
isPlayAll: false,
frameNameRoot: '',
frameCount: 0,
timeInterval: 10,
reqeatTime: 0,
_nowIdx: {
get: function () {
return this.__nowIdx || 0;
},
set: function (value) {
if (this.reqeatTime > 0) {
let time = parseInt(value / this.frameCount);
console.log('time=', time);
if (time >= this.reqeatTime) {
console.log('stop play');
this.node.destroy();
return;
}
}
value %= this.frameCount;
if (this.__nowIdx !== value) {
this.__nowIdx = value;
console.log('nowIdx=', this.__nowIdx);
this.setSpriteFrame(this.__nowIdx)
}
}
}
},
/**
* 组件脚本的初始化,可以操作this.node
*/
onLoad() {
this.init();
},
/**
* 注册事件
*/
registerEvent() {
},
/**
* 使用cc.instantiate()创建实例时
* 通过getComponent(脚本名称)取得脚本实例
* 然后使用init(data)来传递参数
* @param {*} data
*/
init(data) {
this.dtTime = 0;
if (this.isPlayAll) {
this.frameCount = this.spriteAtlas.getSpriteFrames().length;
}
this.totalTime = this.timeInterval * this.timeInterval;
console.log('totalTime=', this.totalTime);
this.sprite = this.node.getComponent(cc.Sprite);
this.startAnim();
},
/**
* 0 为一直重复
* n 为共n次
* @param {*} time
*/
setReqeat(time) {
},
/**
* 开始运动
*/
startAnim() {
this.stop = false;
},
/**
* 停止运动
*/
stopAnim() {
this.stop = true;
},
/**
* 设置图片
* @param {*} idx
*/
setSpriteFrame(idx) {
if (this.stop) {
return;
}
idx = idx < 10 ? '0' + idx : '' + idx;
let name = this.frameNameRoot + idx;
console.log('idx=', idx, name);
console.log('sprite=', this.spriteAtlas.getSpriteFrame(name));
if (this.isPlayAll) {
idx = parseInt(idx);
this.sprite.spriteFrame = this.spriteAtlas.getSpriteFrames()[idx];
} else {
this.sprite.spriteFrame = this.spriteAtlas.getSpriteFrame(name);
}
},
/**
* 每一帧回调
* @param {*} dt
*/
update(dt) {
this.dtTime += dt * 1000;
console.log('frameAnim', this.dtTime);
this._nowIdx = parseInt(this.dtTime / this.timeInterval);
},
/**
* 统一回收组件
*/
onDestroy() {
}
});

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "0ee8c63d-7376-406e-9415-2c6834231cb8",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,22 @@
cc.Class({
extends: cc.Component,
properties: {
label: {
default: null,
type: cc.Label
},
// defaults, set visually when attaching this script to the Canvas
text: 'Hello, World!'
},
// use this for initialization
onLoad: function () {
this.label.string = this.text;
},
// called every frame
update: function (dt) {
},
});

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "280c3aec-6492-4a9d-9f51-a9b00b570b4a",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,6 @@
{
"ver": "1.0.1",
"uuid": "7b81d4e8-ec84-4716-968d-500ac1d78a54",
"isGroup": false,
"subMetas": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -0,0 +1,31 @@
{
"ver": "2.2.0",
"uuid": "6aa0aa6a-ebee-4155-a088-a687a6aadec4",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"subMetas": {
"HelloWorld": {
"ver": "1.0.3",
"uuid": "31bc895a-c003-4566-a9f3-2e54ae1c17dc",
"rawTextureUuid": "6aa0aa6a-ebee-4155-a088-a687a6aadec4",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 195,
"height": 270,
"rawWidth": 195,
"rawHeight": 270,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

View File

@@ -0,0 +1,217 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>frames</key>
<dict>
<key>role_level_000.png</key>
<dict>
<key>frame</key>
<string>{{208,630},{92,118}}</string>
<key>offset</key>
<string>{0,-62}</string>
<key>rotated</key>
<true/>
<key>sourceColorRect</key>
<string>{{104,153},{92,118}}</string>
<key>sourceSize</key>
<string>{300,300}</string>
</dict>
<key>role_level_002.png</key>
<dict>
<key>frame</key>
<string>{{266,724},{120,186}}</string>
<key>offset</key>
<string>{11,-39}</string>
<key>rotated</key>
<true/>
<key>sourceColorRect</key>
<string>{{101,96},{120,186}}</string>
<key>sourceSize</key>
<string>{300,300}</string>
</dict>
<key>role_level_004.png</key>
<dict>
<key>frame</key>
<string>{{2,364},{108,228}}</string>
<key>offset</key>
<string>{7,-18}</string>
<key>rotated</key>
<true/>
<key>sourceColorRect</key>
<string>{{103,54},{108,228}}</string>
<key>sourceSize</key>
<string>{300,300}</string>
</dict>
<key>role_level_006.png</key>
<dict>
<key>frame</key>
<string>{{260,2},{112,250}}</string>
<key>offset</key>
<string>{4,-6}</string>
<key>rotated</key>
<true/>
<key>sourceColorRect</key>
<string>{{98,31},{112,250}}</string>
<key>sourceSize</key>
<string>{300,300}</string>
</dict>
<key>role_level_008.png</key>
<dict>
<key>frame</key>
<string>{{2,2},{110,256}}</string>
<key>offset</key>
<string>{4,-3}</string>
<key>rotated</key>
<true/>
<key>sourceColorRect</key>
<string>{{99,25},{110,256}}</string>
<key>sourceSize</key>
<string>{300,300}</string>
</dict>
<key>role_level_010.png</key>
<dict>
<key>frame</key>
<string>{{2,114},{116,252}}</string>
<key>offset</key>
<string>{0,-5}</string>
<key>rotated</key>
<true/>
<key>sourceColorRect</key>
<string>{{92,29},{116,252}}</string>
<key>sourceSize</key>
<string>{300,300}</string>
</dict>
<key>role_level_012.png</key>
<dict>
<key>frame</key>
<string>{{256,116},{122,246}}</string>
<key>offset</key>
<string>{-4,-8}</string>
<key>rotated</key>
<true/>
<key>sourceColorRect</key>
<string>{{85,35},{122,246}}</string>
<key>sourceSize</key>
<string>{300,300}</string>
</dict>
<key>role_level_014.png</key>
<dict>
<key>frame</key>
<string>{{240,240},{128,234}}</string>
<key>offset</key>
<string>{-7,-1}</string>
<key>rotated</key>
<true/>
<key>sourceColorRect</key>
<string>{{79,34},{128,234}}</string>
<key>sourceSize</key>
<string>{300,300}</string>
</dict>
<key>role_level_016.png</key>
<dict>
<key>frame</key>
<string>{{2,232},{130,236}}</string>
<key>offset</key>
<string>{-5,-3}</string>
<key>rotated</key>
<true/>
<key>sourceColorRect</key>
<string>{{80,35},{130,236}}</string>
<key>sourceSize</key>
<string>{300,300}</string>
</dict>
<key>role_level_018.png</key>
<dict>
<key>frame</key>
<string>{{232,370},{122,216}}</string>
<key>offset</key>
<string>{1,-12}</string>
<key>rotated</key>
<true/>
<key>sourceColorRect</key>
<string>{{90,54},{122,216}}</string>
<key>sourceSize</key>
<string>{300,300}</string>
</dict>
<key>role_level_020.png</key>
<dict>
<key>frame</key>
<string>{{136,742},{128,200}}</string>
<key>offset</key>
<string>{0,-2}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{86,52},{128,200}}</string>
<key>sourceSize</key>
<string>{300,300}</string>
</dict>
<key>role_level_022.png</key>
<dict>
<key>frame</key>
<string>{{2,742},{132,202}}</string>
<key>offset</key>
<string>{-1,-1}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{83,50},{132,202}}</string>
<key>sourceSize</key>
<string>{300,300}</string>
</dict>
<key>role_level_024.png</key>
<dict>
<key>frame</key>
<string>{{2,608},{132,204}}</string>
<key>offset</key>
<string>{-2,0}</string>
<key>rotated</key>
<true/>
<key>sourceColorRect</key>
<string>{{82,48},{132,204}}</string>
<key>sourceSize</key>
<string>{300,300}</string>
</dict>
<key>role_level_026.png</key>
<dict>
<key>frame</key>
<string>{{2,474},{132,208}}</string>
<key>offset</key>
<string>{-2,3}</string>
<key>rotated</key>
<true/>
<key>sourceColorRect</key>
<string>{{82,43},{132,208}}</string>
<key>sourceSize</key>
<string>{300,300}</string>
</dict>
<key>role_level_028.png</key>
<dict>
<key>frame</key>
<string>{{212,494},{134,206}}</string>
<key>offset</key>
<string>{-2,0}</string>
<key>rotated</key>
<true/>
<key>sourceColorRect</key>
<string>{{81,47},{134,206}}</string>
<key>sourceSize</key>
<string>{300,300}</string>
</dict>
</dict>
<key>metadata</key>
<dict>
<key>format</key>
<integer>2</integer>
<key>realTextureFileName</key>
<string>ef_role_level.png</string>
<key>size</key>
<string>{512,1024}</string>
<key>smartupdate</key>
<string>$TexturePacker:SmartUpdate:4a72f2237bcda1a75c66b23a3f9df14f$</string>
<key>textureFileName</key>
<string>ef_role_level.png</string>
</dict>
</dict>
</plist>

View File

@@ -0,0 +1,342 @@
{
"ver": "1.2.4",
"uuid": "5452e527-6bd4-4ff5-8ce8-e193dd63bcf0",
"rawTextureUuid": "427746d9-ecb0-4a74-9282-7bee2aef627a",
"size": {
"width": 512,
"height": 1024
},
"type": "Texture Packer",
"subMetas": {
"role_level_000.png": {
"ver": "1.0.3",
"uuid": "47f65b31-6f3c-4fb9-ba5a-28e29040e203",
"rawTextureUuid": "427746d9-ecb0-4a74-9282-7bee2aef627a",
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"offsetX": 0,
"offsetY": -62,
"trimX": 208,
"trimY": 630,
"width": 92,
"height": 118,
"rawWidth": 300,
"rawHeight": 300,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"role_level_002.png": {
"ver": "1.0.3",
"uuid": "f46206fa-e8ca-4311-b7cf-753d33aa97ee",
"rawTextureUuid": "427746d9-ecb0-4a74-9282-7bee2aef627a",
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"offsetX": 11,
"offsetY": -39,
"trimX": 266,
"trimY": 724,
"width": 120,
"height": 186,
"rawWidth": 300,
"rawHeight": 300,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"role_level_004.png": {
"ver": "1.0.3",
"uuid": "d089e409-3112-4298-b3a8-9dd67f037830",
"rawTextureUuid": "427746d9-ecb0-4a74-9282-7bee2aef627a",
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"offsetX": 7,
"offsetY": -18,
"trimX": 2,
"trimY": 364,
"width": 108,
"height": 228,
"rawWidth": 300,
"rawHeight": 300,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"role_level_006.png": {
"ver": "1.0.3",
"uuid": "f038dadb-54f8-4a79-8989-a3983e428782",
"rawTextureUuid": "427746d9-ecb0-4a74-9282-7bee2aef627a",
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"offsetX": 4,
"offsetY": -6,
"trimX": 260,
"trimY": 2,
"width": 112,
"height": 250,
"rawWidth": 300,
"rawHeight": 300,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"role_level_008.png": {
"ver": "1.0.3",
"uuid": "2ccfe906-eb8a-4294-b904-a60c341bdf0b",
"rawTextureUuid": "427746d9-ecb0-4a74-9282-7bee2aef627a",
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"offsetX": 4,
"offsetY": -3,
"trimX": 2,
"trimY": 2,
"width": 110,
"height": 256,
"rawWidth": 300,
"rawHeight": 300,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"role_level_010.png": {
"ver": "1.0.3",
"uuid": "1db30f8c-758e-400a-917f-bdd10d0b6789",
"rawTextureUuid": "427746d9-ecb0-4a74-9282-7bee2aef627a",
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"offsetX": 0,
"offsetY": -5,
"trimX": 2,
"trimY": 114,
"width": 116,
"height": 252,
"rawWidth": 300,
"rawHeight": 300,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"role_level_012.png": {
"ver": "1.0.3",
"uuid": "faf17e97-626c-4321-ab90-babb53dd739f",
"rawTextureUuid": "427746d9-ecb0-4a74-9282-7bee2aef627a",
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"offsetX": -4,
"offsetY": -8,
"trimX": 256,
"trimY": 116,
"width": 122,
"height": 246,
"rawWidth": 300,
"rawHeight": 300,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"role_level_014.png": {
"ver": "1.0.3",
"uuid": "52fe62d5-04c9-4ac2-a4e9-709add4964ab",
"rawTextureUuid": "427746d9-ecb0-4a74-9282-7bee2aef627a",
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"offsetX": -7,
"offsetY": -1,
"trimX": 240,
"trimY": 240,
"width": 128,
"height": 234,
"rawWidth": 300,
"rawHeight": 300,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"role_level_016.png": {
"ver": "1.0.3",
"uuid": "1a711c3d-7b0e-42ae-a84c-2bfb1602373e",
"rawTextureUuid": "427746d9-ecb0-4a74-9282-7bee2aef627a",
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"offsetX": -5,
"offsetY": -3,
"trimX": 2,
"trimY": 232,
"width": 130,
"height": 236,
"rawWidth": 300,
"rawHeight": 300,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"role_level_018.png": {
"ver": "1.0.3",
"uuid": "9ebc84ed-c856-4c43-b8db-7107186ef34e",
"rawTextureUuid": "427746d9-ecb0-4a74-9282-7bee2aef627a",
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"offsetX": 1,
"offsetY": -12,
"trimX": 232,
"trimY": 370,
"width": 122,
"height": 216,
"rawWidth": 300,
"rawHeight": 300,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"role_level_020.png": {
"ver": "1.0.3",
"uuid": "35636f36-b2e1-4230-a360-eaef623abf64",
"rawTextureUuid": "427746d9-ecb0-4a74-9282-7bee2aef627a",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -2,
"trimX": 136,
"trimY": 742,
"width": 128,
"height": 200,
"rawWidth": 300,
"rawHeight": 300,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"role_level_022.png": {
"ver": "1.0.3",
"uuid": "0c50bdb6-78bb-46b0-ad9e-e8029d6b500c",
"rawTextureUuid": "427746d9-ecb0-4a74-9282-7bee2aef627a",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -1,
"offsetY": -1,
"trimX": 2,
"trimY": 742,
"width": 132,
"height": 202,
"rawWidth": 300,
"rawHeight": 300,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"role_level_024.png": {
"ver": "1.0.3",
"uuid": "41bbc72a-5e33-480b-a748-c4d3204b6b4b",
"rawTextureUuid": "427746d9-ecb0-4a74-9282-7bee2aef627a",
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"offsetX": -2,
"offsetY": 0,
"trimX": 2,
"trimY": 608,
"width": 132,
"height": 204,
"rawWidth": 300,
"rawHeight": 300,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"role_level_026.png": {
"ver": "1.0.3",
"uuid": "59bbe21f-f5e7-4d80-a099-6c39b78e886e",
"rawTextureUuid": "427746d9-ecb0-4a74-9282-7bee2aef627a",
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"offsetX": -2,
"offsetY": 3,
"trimX": 2,
"trimY": 474,
"width": 132,
"height": 208,
"rawWidth": 300,
"rawHeight": 300,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"role_level_028.png": {
"ver": "1.0.3",
"uuid": "ec235aec-c9ec-4429-baf9-a99d868e6e7d",
"rawTextureUuid": "427746d9-ecb0-4a74-9282-7bee2aef627a",
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"offsetX": -2,
"offsetY": 0,
"trimX": 212,
"trimY": 494,
"width": 134,
"height": 206,
"rawWidth": 300,
"rawHeight": 300,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

View File

@@ -0,0 +1,31 @@
{
"ver": "2.2.0",
"uuid": "427746d9-ecb0-4a74-9282-7bee2aef627a",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"subMetas": {
"ef_role_level": {
"ver": "1.0.3",
"uuid": "eaa7c972-ff90-4c53-adbb-089f098bde79",
"rawTextureUuid": "427746d9-ecb0-4a74-9282-7bee2aef627a",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -3,
"offsetY": 39.5,
"trimX": 2,
"trimY": 3,
"width": 502,
"height": 939,
"rawWidth": 512,
"rawHeight": 1024,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -0,0 +1,31 @@
{
"ver": "2.2.0",
"uuid": "a8027877-d8d6-4645-97a0-52d4a0123dba",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"subMetas": {
"singleColor": {
"ver": "1.0.3",
"uuid": "410fb916-8721-4663-bab8-34397391ace7",
"rawTextureUuid": "a8027877-d8d6-4645-97a0-52d4a0123dba",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 2,
"height": 2,
"rawWidth": 2,
"rawHeight": 2,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

20635
FrameAnimDemo/creator.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,15 @@
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"experimentalDecorators": true
},
"exclude": [
"node_modules",
".vscode",
"library",
"local",
"settings",
"temp"
]
}

View File

@@ -0,0 +1,4 @@
{
"engine": "cocos2d-html5",
"packages": "packages"
}

View File

@@ -0,0 +1,13 @@
{
"excludeScenes": [],
"orientation": {
"landscapeLeft": true,
"landscapeRight": true,
"portrait": false,
"upsideDown": false
},
"packageName": "org.cocos2d.helloworld",
"startScene": "2d2f792f-a40c-49bb-a189-ed176a246e49",
"title": "hello_world",
"webOrientation": "auto"
}

View File

@@ -0,0 +1,7 @@
{
"excludeScenes": [],
"packageName": "org.cocos2d.helloworld",
"platform": "web-mobile",
"startScene": "2d2f792f-a40c-49bb-a189-ed176a246e49",
"title": "HelloWorld"
}

View File

@@ -0,0 +1,28 @@
{
"collision-matrix": [
[
true
]
],
"excluded-modules": [],
"group-list": [
"default"
],
"start-scene": "current",
"design-resolution-width": 960,
"design-resolution-height": 640,
"fit-width": false,
"fit-height": true,
"use-project-simulator-setting": false,
"simulator-orientation": false,
"use-customize-simulator": false,
"simulator-resolution": {
"width": 960,
"height": 640
},
"cocos-analytics": {
"enable": false,
"appID": "13798",
"appSecret": "959b3ac0037d0f3c2fdce94f8421a9b2"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -0,0 +1,5 @@
{
"name": "TEMPLATES.helloworld.name",
"desc": "TEMPLATES.helloworld.desc",
"banner": "template-banner.png"
}