#193 light on off
This commit is contained in:
parent
c0c6e98fef
commit
0a6a42ef2c
File diff suppressed because it is too large
Load Diff
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user