Adjusted door timetables, added clock and wall trashcan

This commit is contained in:
2026-10-19 22:21:32 +03:00
parent 6feebad4d2
commit 3afa51004f
197 changed files with 13402 additions and 363 deletions
@@ -0,0 +1,39 @@
using System;
using System.Collections;
using UnityEngine;
public class ClockManager : MonoBehaviour
{
public Clock[] clocks;
void Start()
{
StartCoroutine(UpdateClocks());
}
IEnumerator UpdateClocks()
{
while (true)
{
// Read the computer's local time.
DateTime now = DateTime.Now;
// Synchronize every clock.
foreach (Clock clock in clocks)
{
if (clock != null)
{
clock.SetTime(now);
}
}
// Wait until approximately the next minute.
now = DateTime.Now;
float waitTime =
60f - now.Second - now.Millisecond / 1000f;
yield return new WaitForSecondsRealtime(waitTime);
}
}
}