72 launchAnimation->addAnimation(anim); |
72 launchAnimation->addAnimation(anim); |
73 anim = new QPropertyAnimation(this, "pos"); |
73 anim = new QPropertyAnimation(this, "pos"); |
74 anim->setEndValue(QPointF(x() + delta*2,scene()->height())); |
74 anim->setEndValue(QPointF(x() + delta*2,scene()->height())); |
75 anim->setDuration(y()/2*60); |
75 anim->setDuration(y()/2*60); |
76 launchAnimation->addAnimation(anim); |
76 launchAnimation->addAnimation(anim); |
77 connect(anim,SIGNAL(valueChanged(const QVariant &)),this,SLOT(onAnimationLaunchValueChanged(const QVariant &))); |
77 connect(anim,SIGNAL(valueChanged(QVariant)),this,SLOT(onAnimationLaunchValueChanged(QVariant))); |
78 connect(this, SIGNAL(bombExploded()), launchAnimation, SLOT(stop())); |
78 connect(this, SIGNAL(bombExploded()), launchAnimation, SLOT(stop())); |
79 //We setup the state machine of the bomb |
79 //We setup the state machine of the bomb |
80 QStateMachine *machine = new QStateMachine(this); |
80 QStateMachine *machine = new QStateMachine(this); |
81 |
81 |
82 //This state is when the launch animation is playing |
82 //This state is when the launch animation is playing |