Home > other >  5 seconds from harm
5 seconds from harm

Time:09-27

Beginners turn to
A monster attack will play running animation, attack is decision of the collision, 5 seconds from harm stops, inquire of 5 seconds from harm script what to use to judge?

CodePudding user response:

Using invoke delay five seconds to do stop function, if hurt the invoke will interrupt

CodePudding user response:

In the UPDATE timer to five seconds to stop the animation and stop timing hurt every time when the timer to zero and start timing

CodePudding user response:

Int HP;
Int lastHp;
Bool notDamage;
Float timer=0;
Updata
{
LastHp=HP;
If (lastHp!=HP)
{
The timer=Time. Time + 5;
NotDamage=false;
LastHp=Hp;
}
The else (timer{
NotDamage=true;
}
}
  • Related