24 lines
546 B
C#
24 lines
546 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Restaurant : MonoBehaviour
|
|
{
|
|
public Transform restaurantSwitch;
|
|
private bool isSwitchOn = false;
|
|
|
|
public void RestaurantSwitchOnOff()
|
|
{
|
|
if (!isSwitchOn)
|
|
{
|
|
restaurantSwitch.rotation *= Quaternion.Euler(0, 0, -90);
|
|
isSwitchOn = true;
|
|
}
|
|
else
|
|
{
|
|
restaurantSwitch.rotation *= Quaternion.Euler(0, 0, 90);
|
|
isSwitchOn = false;
|
|
}
|
|
}
|
|
} |