Allow light to be disabled by scripting

This commit is contained in:
Benau 2017-11-04 14:01:47 +08:00
parent cc970c01a5
commit 628bc7ce50
2 changed files with 8 additions and 0 deletions

View File

@ -1039,6 +1039,13 @@ void TrackObjectPresentationLight::setEnergy(float energy)
lnode->setEnergy(energy);
}
}
// ----------------------------------------------------------------------------
void TrackObjectPresentationLight::setEnable(bool enabled)
{
if (m_node != NULL)
m_node->setVisible(enabled);
} // setEnable
// ----------------------------------------------------------------------------
TrackObjectPresentationActionTrigger::TrackObjectPresentationActionTrigger(
const XMLNode& xml_node,

View File

@ -360,6 +360,7 @@ public:
scene::ISceneNode* parent);
virtual ~TrackObjectPresentationLight();
float getEnergy() const { return m_energy; }
virtual void setEnable(bool enabled) OVERRIDE;
void setEnergy(float energy);
}; // TrackObjectPresentationLight