Work on little cutscene where you earn a trophy
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10858 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
c92df26ea6
commit
49d190defe
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -289,6 +289,7 @@ void FeatureUnlockedCutScene::init()
|
|||||||
if (m_unlocked_stuff[n].m_unlock_model.size() > 0)
|
if (m_unlocked_stuff[n].m_unlock_model.size() > 0)
|
||||||
{
|
{
|
||||||
m_unlocked_stuff[n].m_root_gift_node = irr_driver->addMesh( irr_driver->getMesh(m_unlocked_stuff[n].m_unlock_model) );
|
m_unlocked_stuff[n].m_root_gift_node = irr_driver->addMesh( irr_driver->getMesh(m_unlocked_stuff[n].m_unlock_model) );
|
||||||
|
m_unlocked_stuff[n].m_root_gift_node->setScale( core::vector3df(0.5f, 0.5f, 0.5f) );
|
||||||
}
|
}
|
||||||
else if (m_unlocked_stuff[n].m_unlocked_kart != NULL)
|
else if (m_unlocked_stuff[n].m_unlocked_kart != NULL)
|
||||||
{
|
{
|
||||||
@ -451,23 +452,24 @@ void FeatureUnlockedCutScene::onUpdate(float dt,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pos.X += 2.0f*dt;
|
//pos.X -= 2.0f*dt;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_global_time > GIFT_EXIT_FROM + 2.0f) pos.Z += 5.0f*dt;
|
if (m_global_time > GIFT_EXIT_FROM + 2.0f) pos.Z += 6.0f*dt;
|
||||||
|
|
||||||
m_unlocked_stuff[n].m_root_gift_node->setPosition(pos);
|
m_unlocked_stuff[n].m_root_gift_node->setPosition(pos);
|
||||||
|
|
||||||
core::vector3df scale =
|
core::vector3df scale =
|
||||||
m_unlocked_stuff[n].m_root_gift_node->getScale();
|
m_unlocked_stuff[n].m_root_gift_node->getScale();
|
||||||
scale.X += 2.0f*dt;
|
scale.X += 0.9f*dt;
|
||||||
scale.Y += 2.0f*dt;
|
scale.Y += 0.9f*dt;
|
||||||
scale.Z += 2.0f*dt;
|
scale.Z += 0.9f*dt;
|
||||||
m_unlocked_stuff[n].m_root_gift_node->setScale(scale);
|
m_unlocked_stuff[n].m_root_gift_node->setScale(scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
core::vector3df campos = m_camera->getPosition();
|
core::vector3df campos = m_camera->getPosition();
|
||||||
campos.X += 2.0f*dt;
|
campos.X -= 8.0f*dt;
|
||||||
|
campos.Y += 5.0f*dt;
|
||||||
campos.Z += 5.0f*dt;
|
campos.Z += 5.0f*dt;
|
||||||
|
|
||||||
m_camera->setPosition(campos);
|
m_camera->setPosition(campos);
|
||||||
@ -483,6 +485,8 @@ void FeatureUnlockedCutScene::onUpdate(float dt,
|
|||||||
{
|
{
|
||||||
if (m_unlocked_stuff[n].m_root_gift_node == NULL) continue;
|
if (m_unlocked_stuff[n].m_root_gift_node == NULL) continue;
|
||||||
|
|
||||||
|
m_unlocked_stuff[n].m_root_gift_node->setRotation(m_unlocked_stuff[n].m_root_gift_node->getRotation() + core::vector3df(0.0f, dt*25.0f, 0.0f));
|
||||||
|
|
||||||
if (!m_unlocked_stuff[n].m_pictures.empty())
|
if (!m_unlocked_stuff[n].m_pictures.empty())
|
||||||
{
|
{
|
||||||
const int pictureCount = m_unlocked_stuff[n].m_pictures.size();
|
const int pictureCount = m_unlocked_stuff[n].m_pictures.size();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user