Unity development tips (1), timer Timer

1. The first timer Time.deltaTime

Time.deltaTime is the execution time of each frame of the game. This method is generally timed by addition. The principle is to use the execution time of each frame of the Update method in nity. After the button is pressed, it will continue to accumulate. When it is greater than the timing time, it will be closed. It can be used according to actual use. Addition and subtraction are performed according to the situation, and the addition operation is given below.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public

Guess you like

Origin blog.csdn.net/weixin_45724919/article/details/126402345