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 interruptCodePudding 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 timingCodePudding 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;
}
}