#193 light on off

This commit is contained in:
IDMhan 2024-03-03 23:04:28 +09:00
parent c0c6e98fef
commit 0a6a42ef2c
2 changed files with 224 additions and 858 deletions

File diff suppressed because it is too large Load Diff

View File

@ -7,6 +7,9 @@ public class Restaurant : MonoBehaviour
{
public Transform restaurantSwitch;
private bool isSwitchOn = false;
public Transform mainDoor;
public Transform[] guestNpc;
public GameObject[] mainLight;
public void RestaurantSwitchOnOff()
{
@ -14,11 +17,21 @@ public class Restaurant : MonoBehaviour
{
restaurantSwitch.rotation *= Quaternion.Euler(0, 0, -90);
isSwitchOn = true;
foreach (var light in mainLight)
{
light.SetActive(true);
}
}
else
{
restaurantSwitch.rotation *= Quaternion.Euler(0, 0, 90);
isSwitchOn = false;
foreach (var light in mainLight)
{
light.SetActive(false);
}
}
}
}