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 UnityEngine;
using System;
public class Clock : MonoBehaviour
{
public GameObject HourHand;
public GameObject MinuteHand;
private Vector3 hourBaseAngles;
private Vector3 minuteBaseAngles;
void Awake()
{
// Remember the original orientations.
hourBaseAngles = HourHand.transform.localEulerAngles;
minuteBaseAngles = MinuteHand.transform.localEulerAngles;
}
public void SetTime(DateTime time)
{
// Calculate the hand angles.
float minuteAngle = time.Minute * 6f;
float hourAngle = (time.Hour % 12 + time.Minute / 60f) * 30f;
// Preserve the original X and Z rotations.
HourHand.transform.localRotation = Quaternion.Euler(
hourBaseAngles.x,
hourBaseAngles.y + hourAngle,
hourBaseAngles.z
);
MinuteHand.transform.localRotation = Quaternion.Euler(
minuteBaseAngles.x,
minuteBaseAngles.y + minuteAngle,
minuteBaseAngles.z
);
}
}