完善 docs

This commit is contained in:
SmallMain
2022-06-17 18:42:43 +08:00
parent a815401a2c
commit 142e19d075
45 changed files with 11534 additions and 149 deletions

View File

@@ -0,0 +1,12 @@
{
"ver": "1.1.2",
"uuid": "21700e21-cd6e-4f4e-88f8-c97c886e2e5c",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,8 @@
{
"ver": "1.2.9",
"uuid": "76663793-b023-4931-89fb-febc115c2a43",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@@ -0,0 +1,12 @@
{
"ver": "1.1.2",
"uuid": "51588566-10c7-4926-847c-4b69bf536e7b",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,8 @@
{
"ver": "1.2.9",
"uuid": "03129ae1-98e5-4264-a51b-6f95f23d742a",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@@ -0,0 +1,60 @@
const { ccclass, property } = cc._decorator;
@ccclass
export default class SpineSkin extends cc.Component {
@property(cc.Node)
addBoyBtn: cc.Node = null;
@property(cc.Node)
removeBoyBtn: cc.Node = null;
@property(cc.Node)
randomChangeBtn: cc.Node = null;
@property(cc.Node)
boy: cc.Node = null;
@property([cc.SpriteFrame])
heads: cc.SpriteFrame[] = [];
boys: cc.Node[] = [];
protected start(): void {
const boySpine = this.boy.getComponentInChildren(sp.Skeleton);
const newSkeletonData = boySpine.skeletonData.clone();
boySpine.skeletonData = newSkeletonData;
boySpine.animation = 'attack';
this.boys.push(this.boy);
this.addBoyBtn.on('click', () => {
const newBoy = cc.instantiate(this.boy);
const newBoySpine = newBoy.getComponentInChildren(sp.Skeleton);
boySpine.skeletonData = newBoySpine.skeletonData.clone();
boySpine.animation = 'attack';
this.boy.parent.addChild(newBoy);
newBoy.setPosition(this.boys[this.boys.length - 1].position);
newBoy.x += 100;
if (this.boys.length % 2 === 1) {
newBoy.getComponentInChildren(sp.Skeleton).setAnimationCacheMode(sp.Skeleton.AnimationCacheMode.PRIVATE_CACHE);
newBoy.getComponentInChildren(cc.Label).string = `Spine - Cache`;
}
this.boys.push(newBoy);
});
this.removeBoyBtn.on('click', () => {
if (this.boys.length > 1) {
this.boys[this.boys.length - 1].destroy();
this.boys.length -= 1;
}
});
this.randomChangeBtn.on('click', () => {
const boy = this.boys[this.boys.length - 1].getComponentInChildren(sp.Skeleton);
boy.setRegion('Head', 'Head', sp.SkeletonData.createRegion(this.heads[Math.floor(Math.random() * (this.heads.length))]));
});
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.0.8",
"uuid": "27990422-853f-43c5-a2c7-52900cb9edef",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,12 @@
{
"ver": "1.1.2",
"uuid": "4650da5c-d240-4ce6-b314-9e896888dd88",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}

View File

@@ -0,0 +1,209 @@
huatuo.png
size: 701,208
format: RGBA8888
filter: Linear,Linear
repeat: none
Body
rotate: false
xy: 487, 72
size: 90, 91
orig: 90, 91
offset: 0, 0
index: -1
Eye
rotate: false
xy: 473, 44
size: 45, 24
orig: 45, 24
offset: 0, 0
index: -1
Eye-beiji
rotate: false
xy: 360, 60
size: 57, 23
orig: 57, 23
offset: 0, 0
index: -1
Eye-fennu
rotate: false
xy: 570, 39
size: 39, 21
orig: 39, 21
offset: 0, 0
index: -1
Eye-shengli
rotate: false
xy: 421, 64
size: 45, 19
orig: 45, 19
offset: 0, 0
index: -1
Eye-siwang
rotate: false
xy: 522, 48
size: 44, 20
orig: 44, 20
offset: 0, 0
index: -1
Head
rotate: false
xy: 581, 64
size: 89, 99
orig: 89, 99
offset: 0, 0
index: -1
L-Forearm
rotate: false
xy: 613, 29
size: 32, 31
orig: 32, 31
offset: 0, 0
index: -1
L-Hand
rotate: false
xy: 674, 150
size: 27, 26
orig: 27, 26
offset: 0, 0
index: -1
L-Lowerleg
rotate: false
xy: 674, 117
size: 26, 29
orig: 26, 29
offset: 0, 0
index: -1
L-Thigh
rotate: false
xy: 649, 25
size: 29, 35
orig: 29, 35
offset: 0, 0
index: -1
L-Upperarm
rotate: false
xy: 318, 7
size: 50, 49
orig: 50, 49
offset: 0, 0
index: -1
Mouth
rotate: false
xy: 682, 36
size: 18, 10
orig: 18, 10
offset: 0, 0
index: -1
Mouth-beiji
rotate: false
xy: 470, 72
size: 13, 11
orig: 13, 11
offset: 0, 0
index: -1
Mouth-fennu
rotate: false
xy: 674, 66
size: 22, 17
orig: 22, 17
offset: 0, 0
index: -1
Mouth-shengli
rotate: false
xy: 581, 17
size: 20, 18
orig: 20, 18
offset: 0, 0
index: -1
Mouth-siwang
rotate: false
xy: 682, 50
size: 18, 12
orig: 18, 12
offset: 0, 0
index: -1
Pelvis
rotate: false
xy: 641, 180
size: 43, 28
orig: 43, 28
offset: 0, 0
index: -1
R-Forearm
rotate: false
xy: 473, 9
size: 38, 31
orig: 38, 31
offset: 0, 0
index: -1
R-Hand
rotate: false
xy: 549, 12
size: 28, 23
orig: 28, 23
offset: 0, 0
index: -1
R-Lowerleg
rotate: false
xy: 674, 87
size: 26, 26
orig: 26, 26
offset: 0, 0
index: -1
R-Thigh
rotate: false
xy: 515, 4
size: 30, 36
orig: 30, 36
offset: 0, 0
index: -1
R-Upperarm
rotate: false
xy: 431, 12
size: 38, 48
orig: 38, 48
offset: 0, 0
index: -1
SE-daoguang
rotate: false
xy: 0, 0
size: 239, 208
orig: 239, 208
offset: 0, 0
index: -1
SE-guang
rotate: false
xy: 360, 87
size: 123, 121
orig: 123, 121
offset: 0, 0
index: -1
Weapon
rotate: false
xy: 243, 10
size: 71, 46
orig: 71, 46
offset: 0, 0
index: -1
beilou
rotate: false
xy: 243, 60
size: 113, 148
orig: 113, 148
offset: 0, 0
index: -1
hulu
rotate: false
xy: 372, 4
size: 55, 52
orig: 55, 52
offset: 0, 0
index: -1
shadow
rotate: false
xy: 487, 167
size: 150, 41
orig: 150, 41
offset: 0, 0
index: -1

View File

@@ -0,0 +1,5 @@
{
"ver": "1.0.1",
"uuid": "69163ff4-f84e-4d78-8ea7-946f62007fcd",
"subMetas": {}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.3",
"uuid": "9374ce8a-ae46-427f-9760-3694307fb4fa",
"textures": [
"804e11b5-bf4f-4a78-ac4a-8443e7166be1"
],
"scale": 1,
"subMetas": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -0,0 +1,36 @@
{
"ver": "2.3.5",
"uuid": "804e11b5-bf4f-4a78-ac4a-8443e7166be1",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 701,
"height": 208,
"platformSettings": {},
"subMetas": {
"huatuo": {
"ver": "1.0.4",
"uuid": "b539b334-af1d-460c-a18d-de4e55947d2c",
"rawTextureUuid": "804e11b5-bf4f-4a78-ac4a-8443e7166be1",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 2.5,
"offsetY": 0,
"trimX": 5,
"trimY": 0,
"width": 696,
"height": 208,
"rawWidth": 701,
"rawHeight": 208,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}