OldBlueWater/BlueWater/Assets/Restaurant.cs

24 lines
546 B
C#
Raw Normal View History

2024-03-03 10:55:46 +00:00
using System;
2024-02-11 05:21:29 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Restaurant : MonoBehaviour
{
2024-03-03 10:55:46 +00:00
public Transform restaurantSwitch;
private bool isSwitchOn = false;
2024-02-11 05:21:29 +00:00
2024-03-03 10:55:46 +00:00
public void RestaurantSwitchOnOff()
2024-02-11 05:21:29 +00:00
{
2024-03-03 10:55:46 +00:00
if (!isSwitchOn)
{
restaurantSwitch.rotation *= Quaternion.Euler(0, 0, -90);
isSwitchOn = true;
}
else
{
restaurantSwitch.rotation *= Quaternion.Euler(0, 0, 90);
isSwitchOn = false;
}
2024-02-11 05:21:29 +00:00
}
2024-03-03 10:55:46 +00:00
}