equal
deleted
inserted
replaced
42 void SpritePosition::reset() |
42 void SpritePosition::reset() |
43 { |
43 { |
44 fY = -1 * iSpriteHeight; |
44 fY = -1 * iSpriteHeight; |
45 fX = (qrand() % ((int)(wParent->width() * 1.5))) - wParent->width()/2; |
45 fX = (qrand() % ((int)(wParent->width() * 1.5))) - wParent->width()/2; |
46 fYMov = ((qrand() % 400)+300) / 100.0f; |
46 fYMov = ((qrand() % 400)+300) / 100.0f; |
47 fXMov = fYMov * 0.5f; |
47 fXMov = fYMov * 0.2f+((qrand()%100)/100.0f * 0.6f); //so between 0.2 and 0.6, or 0.5 +/- 0.3 |
48 iAngle = qrand() % 360; |
48 iAngle = qrand() % 360; |
49 } |
49 } |
50 |
50 |
51 QPoint SpritePosition::pos() |
51 QPoint SpritePosition::pos() |
52 { |
52 { |