Parking/Assets/Scripts/ParkingManager.cs

34 lines
775 B
C#
Raw Normal View History

2022-08-25 17:58:26 +02:00
using System;
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
public class ParkingManager : MonoBehaviour
{
[SerializeField] private float width = 68;
[SerializeField] private float height = 29;
[SerializeField] private int stepTime = 15;
[SerializeField] private TextMeshProUGUI timeText;
private TimeSpan _currentTime = TimeSpan.FromHours(8);
public void AdvanceTime()
{
_currentTime += TimeSpan.FromMinutes(15);
timeText.text = _currentTime.ToString();
}
// Start is called before the first frame update
void Start()
{
timeText.text = _currentTime.ToString();
}
// Update is called once per frame
void Update()
{
}
}