I am trying to make a GUITexture for a wepons cooldown when I fire. I used one where the GUISlider changes as Time.time changes with 2 seperate textures. But I can't link it to my varaible time dely before refire.
Thankyou in advance
I am trying to make a GUITexture for a wepons cooldown when I fire. I used one where the GUISlider changes as Time.time changes with 2 seperate textures. But I can't link it to my varaible time dely before refire.
Thankyou in advance
you can try this
float mTimeCurrentCD;
void setTime(int seconds) {
mTimeCurrentCD = seconds + Time.realtimeSinceStartup;
}
void canUseSkill() {
float time = mTimeCurrentCD - Time.realtimeSinceStartup;
return !(time > 0);
}
and also you can try this https://www.assetstore.unity3d.com/#/content/7330
wish for help.