Answers for "simple time c#"

C#
1

simple time c#

public float timeLeft = 20.0f; //you can change this aswell

void Update()
{
timeLeft -= Time.deltaTime; //you can change this to just removing a number
            if (timeLeft < 0)
            {
            //Method here
            timeLeft += 20.0f; //change this to what you want
            }
}
Posted by: Guest on February-23-2021

C# Answers by Framework

Browse Popular Code Answers by Language