- Home /
Weapons Cool Down
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
Answer by yyfish.yy · Mar 01, 2013 at 03:09 AM
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.
Your answer
Follow this Question
Related Questions
Add Delay to Moving Platform 1 Answer
Basic toggle timer Help! 2 Answers
Better way for a timer to load a level? 1 Answer
How to add a delay to a bomb explostion 1 Answer
deactivate script for time period when script is used 0 Answers