mirror of
https://github.com/genxium/DelayNoMore
synced 2024-12-28 04:28:04 +00:00
30 lines
710 B
JavaScript
30 lines
710 B
JavaScript
const Bullet = require("./Bullet");
|
|
|
|
cc.Class({
|
|
extends: Bullet,
|
|
|
|
ctor() {
|
|
this.lastUsed = -1;
|
|
this.bulletLocalId = -1;
|
|
this.speciesName = null;
|
|
},
|
|
|
|
setSpecies(speciesName, fireballBullet, rdf) {
|
|
if (speciesName == this.speciesName) return;
|
|
if (null != this.speciesName) {
|
|
for (let k in this.animNode.children) {
|
|
const child = this.children[k];
|
|
if (!child.active) continue;
|
|
if (child == effAnimNode || child.name == speciesName) continue;
|
|
child.active = false;
|
|
}
|
|
}
|
|
this.speciesName = speciesName;
|
|
this.effAnimNode = this.animNode.getChildByName(this.speciesName);
|
|
this.effAnimNode.active = true;
|
|
},
|
|
|
|
onLoad() {},
|
|
|
|
});
|