云环境和本地调试 添加
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { _decorator, Animation, Component, Node, sp } from 'cc';
|
||||
import { _decorator, Animation, Component, Node } from 'cc';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('AnmEndCom')
|
||||
@@ -11,16 +11,7 @@ export class AnmEndCom extends Component {
|
||||
anim.on(Animation.EventType.FINISHED, this.onAnimationFinished, this);
|
||||
}
|
||||
|
||||
if(this.node.getChildByName('anm')){
|
||||
if(this.node.getChildByName('anm').getComponent('sp.Skeleton')){
|
||||
var spine = this.node.getChildByName('anm').getComponent('sp.Skeleton') as sp.Skeleton;
|
||||
console.log("has spine",spine)
|
||||
spine.setCompleteListener((trackEntry) => {
|
||||
this.onAnimationFinished()
|
||||
console.log("[track %s][animation %s] complete: %s", trackEntry.trackIndex);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
onAnimationFinished(){
|
||||
this.node.destroy()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "9a6c0cbd-2b5b-4ecd-85d3-c017de7a5b2a",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "5ebc6679-2a71-424f-bacf-48f20949fbd3",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "e7bac796-7cc3-47b4-904b-85a95cc15390",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "45646a08-c887-40db-85be-d1ce6b7442c3",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "a5e3c618-6636-439e-aa36-d4ee97793b18",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "49ffd76d-7069-4947-b170-62cd72619ede",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "65d6266f-bba6-4b98-8343-2a67642ec7eb",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "b1d8ed59-0347-4bb6-ab9f-86276714afca",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "69132caf-02ba-40a8-a835-30baced39701",
|
||||
|
||||
@@ -1,18 +1,13 @@
|
||||
import { _decorator, Component, Node, sp } from 'cc';
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
const { ccclass, property ,} = _decorator;
|
||||
|
||||
@ccclass('once')
|
||||
export class once extends Component {
|
||||
private spine!: sp.Skeleton;
|
||||
|
||||
start() {
|
||||
this.spine.setAnimation(0, "animation", true);
|
||||
}
|
||||
protected onLoad(): void {
|
||||
this.spine = this.node.getChildByName("skill").getComponent(sp.Skeleton)!;
|
||||
this.spine.setCompleteListener(trackEntry => {
|
||||
if(this.node.isValid) this.node.active = false;
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
update(deltaTime: number) {
|
||||
|
||||
@@ -1 +1,9 @@
|
||||
{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"6e0a995d-16c1-4554-8f80-29394f24213b","files":[],"subMetas":{},"userData":{}}
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "6e0a995d-16c1-4554-8f80-29394f24213b",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "0f3c4261-15b1-4eda-b105-a81249ee116f",
|
||||
|
||||
@@ -1 +1,9 @@
|
||||
{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"f140b15c-7345-4364-818e-787001fb1c19","files":[],"subMetas":{},"userData":{}}
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "f140b15c-7345-4364-818e-787001fb1c19",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user