//筹码飞到指定位置并缩小一点
void LoginScene::chipFlyFadeIn(int num)
{
//目标区域
Sprite* spDesc = static_cast<Sprite *>(this->csb->getChildByName("Sprite_quan"));
float fX = spDesc->getPosition().x;
float fY = spDesc->getPosition().y;
int iW = spDesc->getContentSize().width - 100;
int iH = spDesc->getContentSize().height - 100;
//起始
Sprite* spSrc = static_cast<Sprite *>(this->csb->getChildByName("Sprite_chip"));
spSrc->setVisible(false);
Vec2 vSrc = spSrc->getPosition();
for (int i = 0; i < num; i++)
{
auto* sp = CCSprite::create("logon/btn_bet_s1.png");
sp->setPosition(vSrc);
addChild(sp);
float _fX = fX - iW / 2 + (rand() % iW);
float _fY = fY - iH / 2 + (rand() % iH);
MoveTo* mt = MoveTo::create(1, Vec3(_fX, _fY, 0));
FadeIn* fin = FadeIn::create(1.0f);
CCActionInterval * st = CCScaleTo::create(2, 0.8f);
sp->runAction(Sequence::create(Spawn::create(fin, mt), DelayTime::create(1.0f), st, NULL));
}
}