hey guy so i have a piece of code i wrote to allow my “special” button to activate once over a certain amount of point thing is once its activated you can keep using it and i want it to activate accept a press then deactivate till the next, lets say 1000 points
is this possible can some one what can be used to portray this?
here is the function i want activated every 1000 pts and it should deactivate once pressed(its tied to a guitexture button on touch screen):
IEnumerator SloMo()
{
if(Time.timeScale == 1.0f)
{
Time.timeScale = newTimeScale;
Time.fixedDeltaTime = Time.fixedDeltaTime/slowFactor;
Time.maximumDeltaTime = Time.maximumDeltaTime/slowFactor;
}
yield return new WaitForSeconds(0.5f);
if(Time.timeScale == newTimeScale)
{
Time.timeScale = 1.0f;
Time.fixedDeltaTime = Time.fixedDeltaTime*slowFactor;
Time.maximumDeltaTime = Time.maximumDeltaTime*slowFactor;
special.enabled = false;
}
}