Sequences running fast on multiple runs

given this code
let centre = cc.Camera.cameras[0].node.position;
var size = cc.winSize; // cc.director.getWinSizeInPixels();
pPhase.position = new cc.v2(centre.x+(size.width/2), centre.y+(size.height/2));
var seqItemsA = [];
seqItemsA.push(cc.fadeTo(0.5,1.0));
seqItemsA.push(cc.delayTime(1.5));
seqItemsA.push(cc.fadeTo(0.5,0.0));
seqItemsA.push(cc.callFunc(this.endBanner,this,pPhase));
pPhase.runAction(cc.sequence(seqItemsA));
First time this code runs it works as expected, next time I run this it happens very fast, then faster to the point it shows for a frame or two… what am I doing wrong?

No, it’s spelt Centre in English. see https://www.lexico.com/en/definition/centre <- Oxford English Dictionary

the issue was Fade to in 0-255 not 0-1 so it was setting it to mostly transparent… however it seems it has a glitch frame or 2 of it being visible, so there is a bug in the system… but setting it to be
seqItemsA.push(cc.fadeTo(0.5,255));
seqItemsA.push(cc.delayTime(1.5));
seqItemsA.push(cc.fadeTo(0.5,0));
“works”

1 Like