Hey guys ![]()
well basically i made a script in java which shoots i am now making this in C# but i have run into a problem.
basically its the yield function in my java all i have to say is yield WaitForSeconds (etc)
but in C#
i put the following:
my variable which holds my time is called :
float ReloadTime = 2.2f
void Reload (){
ReloadTimeYield ();
if (Clips >0){
BulletsLeft = BulletsPerClip;
}
}
IEnumerator ReloadTimeYield (){
yield return new WaitForSeconds (ReloadTime);
}
why is this not working ? if i shoot when the bullets run out the bullets reload to fast. I want my timer to take action so that if my bullets are 0 it will take 3 secs to reload
thank you very much in advance ![]()