Added SetLife and ChangeLife lua functions to Player. Updated changelog.

This commit is contained in:
Kyzentun Keeslala
2015-12-16 15:08:36 -07:00
parent 536be1f64c
commit 4e0fa012c1
15 changed files with 153 additions and 14 deletions
+14
View File
@@ -178,6 +178,20 @@ void LifeMeterTime::ChangeLife( HoldNoteScore hns, TapNoteScore tns )
SendLifeChangedMessage( fOldLife, tns, hns );
}
void LifeMeterTime::ChangeLife(float delta)
{
float old_life= m_fLifeTotalLostSeconds;
m_fLifeTotalLostSeconds-= delta;
SendLifeChangedMessage(old_life, TapNoteScore_Invalid, HoldNoteScore_Invalid);
}
void LifeMeterTime::SetLife(float value)
{
float old_life= m_fLifeTotalLostSeconds;
m_fLifeTotalLostSeconds= value;
SendLifeChangedMessage(old_life, TapNoteScore_Invalid, HoldNoteScore_Invalid);
}
void LifeMeterTime::HandleTapScoreNone()
{
// do nothing.