using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Timer : MonoBehaviour
{
public float timeStart;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.Space))
{
timeStart = Time.time;
}
if (Input.GetKey(KeyCode.Space) && Time.time - timeStart > 0f)
{
Debug.Log((Time.time - timeStart).ToString("F2"));
}
}
}