📜  unity 每秒减去浮点数 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:01.739000             🧑  作者: Mango

代码示例1
public float tr = 0f;
  public float hd = 3f;
   
    void Start()
    {
        tr -= holdDur;
    }
    void Update()
    {

        if (Input.GetButtonDown("button"))
        {
            tr = Time.time; 
        }
        if (Time.time < tr + hd)
        {
            RAM(pw);
        }
    }