|
@@ -22,6 +22,7 @@ DeadPlayer::DeadPlayer( Model2DData *mda, Model2DData *mdb, Vertex posa, Vertex
|
|
|
m2b->setDrehungSpeed( rotB );
|
|
|
alpha = 255;
|
|
|
setCollision( 0 );
|
|
|
+ save();
|
|
|
}
|
|
|
|
|
|
DeadPlayer::~DeadPlayer()
|
|
@@ -63,4 +64,30 @@ Rect2< float > DeadPlayer::getBoundingBox() const
|
|
|
bool DeadPlayer::isFinished() const
|
|
|
{
|
|
|
return alpha == 0;
|
|
|
+}
|
|
|
+
|
|
|
+void DeadPlayer::save()
|
|
|
+{
|
|
|
+ alt.alpha = alpha;
|
|
|
+ alt.posA = m2a->getPosition();
|
|
|
+ alt.speedA = m2a->getSpeed();
|
|
|
+ alt.rotA = m2a->getDrehung();
|
|
|
+ alt.rotSA = m2a->getDrehungSpeed();
|
|
|
+ alt.posB = m2b->getPosition();
|
|
|
+ alt.speedB = m2b->getSpeed();
|
|
|
+ alt.rotB = m2b->getDrehung();
|
|
|
+ alt.rotSB = m2b->getDrehungSpeed();
|
|
|
+}
|
|
|
+
|
|
|
+void DeadPlayer::load()
|
|
|
+{
|
|
|
+ alpha = alt.alpha;
|
|
|
+ m2a->setPosition( alt.posA );
|
|
|
+ m2a->setSpeed( alt.speedA );
|
|
|
+ m2a->setDrehung( alt.rotA );
|
|
|
+ m2a->setDrehungSpeed( alt.rotSA );
|
|
|
+ m2b->setPosition( alt.posB );
|
|
|
+ m2b->setSpeed( alt.speedB );
|
|
|
+ m2b->setDrehung( alt.rotB );
|
|
|
+ m2b->setDrehungSpeed( alt.rotSB );
|
|
|
}
|