Hi guys
I wanna that “PlayerLife -= 3 ;” apply the damage every 3 seconds. How can I do?
function OnCollisionEnter (collision : Collision)
{
if (collision.gameObject.tag == "enemyBase")
{
PlayerLife -= 3 ;
}
else
{
return ;
}
}