Change from 8 to 7 stars (no symmetry) and make them dance up and down (tilt
that changes with time, like edge of coin that is stopping after falling). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4360 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
7bc47f2ffd
commit
de968f2df2
@ -23,7 +23,7 @@
|
||||
#include "irrlicht.h"
|
||||
#include <cmath>
|
||||
|
||||
const int STAR_AMOUNT = 8;
|
||||
const int STAR_AMOUNT = 7;
|
||||
const float RADIUS = 0.7f;
|
||||
const float STAR_SIZE = 0.4f;
|
||||
|
||||
@ -147,9 +147,9 @@ void Stars::update(float delta_t)
|
||||
}
|
||||
|
||||
// set position
|
||||
m_nodes[n]->setPosition(m_center + core::vector3df( std::cos(angle*M_PI*2.0f)*radius,
|
||||
0.0f,
|
||||
std::sin(angle*M_PI*2.0f)*radius));
|
||||
m_nodes[n]->setPosition(m_center + core::vector3df( std::cos(angle*M_PI*2.0f)*radius, // Position in circle
|
||||
std::cos(angle*M_PI*2.0f + m_remaining_time*4.0f)*radius*0.25f, // Shake up and down like falling coin
|
||||
std::sin(angle*M_PI*2.0f)*radius)); // Position in circle
|
||||
} // end for
|
||||
|
||||
if (m_fade_in_time > 0.0f) m_fade_in_time -= delta_t;
|
||||
|
Loading…
Reference in New Issue
Block a user