Monsters that ignore terrain collision should not be moved by other solid objects. Hide fade timers and the internal UpdateFadeTime function from inherited bullet types. Add large stone graphic. Apply fixed time step to large stone throw. Add in physics for large stone throw attack. Release Build 9630.
This commit is contained in:
@@ -61,6 +61,7 @@ Animate2D::Frame Bullet::GetFrame()const{
|
||||
}
|
||||
void Bullet::UpdateFadeTime(float fElapsedTime)
|
||||
{
|
||||
aliveTime+=fElapsedTime;
|
||||
if(fadeInTime>0){
|
||||
if(fadeInTimer<fadeInTime){
|
||||
fadeInTimer=std::min(fadeInTime,fadeInTimer+fElapsedTime);
|
||||
@@ -250,5 +251,13 @@ const bool Bullet::IsActivated()const{
|
||||
return !IsDeactivated();
|
||||
}
|
||||
const bool Bullet::IsDeactivated()const{
|
||||
return fadeOutTime>0.f;
|
||||
return deactivated||fadeOutTime>0.f;
|
||||
}
|
||||
|
||||
void Bullet::Deactivate(){
|
||||
deactivated=true;
|
||||
}
|
||||
|
||||
const double Bullet::GetTimeAlive()const{
|
||||
return aliveTime;
|
||||
}
|
||||
Reference in New Issue
Block a user