В
{
cond = false
}
А прибавление времени суешь в проверку cond на true
Я могу показать скрипт если нужно на проверку круга и ещё раз переслать сам счетчик времени, скажите что там куда добавлять
Size: a a a
В
AZ
AP
VM
AP
A
AP
S
AO
S
Boolean isInsideCircle(float x, float y, float circleX, float circleY, float circleRadius) {
Double absX = Math.Pow(Math.Abs(x - circleX), 2.0);
Double absY = Math.Pow(Math.Abs(y - circleY), 2.0);
return Math.Sqrt(absX + absY) < circleRadius;
}
AP
Boolean isInsideCircle(float x, float y, float circleX, float circleY, float circleRadius) {
Double absX = Math.Pow(Math.Abs(x - circleX), 2.0);
Double absY = Math.Pow(Math.Abs(y - circleY), 2.0);
return Math.Sqrt(absX + absY) < circleRadius;
}
S
D
В
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class TimerForScene : MonoBehaviour
{
public LapSystem laps;
public static float timeStart;
public Text textTimer;
private int currlap;
private int currcheck;
private int checktime=0;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if (checktime == 0)
{
timeStart += Time.deltaTime;
textTimer.text = timeStart.ToString("F2");
Debug.Log(timeStart);
}
if (laps == null)
return;
if (laps.CurrentLap > laps.numof_laps)
{
checktime = 1;
}
}
В
A
Z
В
В
A