If they're right up on you about all you could do is take evasive action either moving sideways or going to the ground. Your gun better be carried so that you can get it out in a hurry.
I've had some narrow escapes with cattle when I didn't see them coming behind me but I heard them. One time all I heard was the sound of a cow blowing snot out of her nose right before she got to me. I jumped sideways and she missed me but it was close. I started packing a pistol all the time because of those close calls. I've seen them coming at me and you don't have much time. I've had them get me too.
If I heard a cow or a nigger running at me I'd take evasive action and I'd probably be pulling a gun as quick as I could too. I have sort of a radar about anyone I don't trust or don't know getting to close to me. That may be because I used to get in fist fights when I was younger. I don't do that anymore but I keep an eye on people that get too close to me.