// Update is called once per frame void Update() { currentTimeToInstantiate += Time.deltaTime; if (currentTimeToInstantiate > randomTime && !EndGameWritting.GetIsIn()) { Create(); currentTimeToInstantiate = 0; } }
// Update is called once per frame void Update() { currentTimePlaying += Time.deltaTime; if (currentTimePlaying >= 0.5f && !EndGameWritting.GetIsIn()) { foreach (Touch t in Input.touches) { if (t.phase == TouchPhase.Began) { TestClick(Camera.main.ScreenToWorldPoint(t.position)); } } if (Input.GetMouseButtonDown(0)) { Vector3 pos = Camera.main.ScreenToWorldPoint(Input.mousePosition); TestClick(pos); } } }