OldBlueWater/BlueWater/Assets/Restaurant.cs
IDMhan 68c818c4af [NAVERWORKS] 1,2,3,4
1. Beer size down
2. Character size down
3. Food now 20count
4. Door On/Off Anime
2024-03-10 17:51:09 +09:00

43 lines
1.1 KiB
C#

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Restaurant : MonoBehaviour
{
public Transform restaurantSwitch;
private bool isSwitchOn = false;
public Transform mainDoor;
public Transform[] guestNpc;
public GameObject[] mainLight;
public void RestaurantSwitchOnOff()
{
if (!isSwitchOn)
{
restaurantSwitch.rotation *= Quaternion.Euler(0, 0, -90);
isSwitchOn = true;
foreach (var light in mainLight)
{
light.SetActive(true);
}
var door = mainDoor.GetComponent<WW_Door>();
door._animator.SetBool("Open", true);
}
else
{
restaurantSwitch.rotation *= Quaternion.Euler(0, 0, 90);
isSwitchOn = false;
foreach (var light in mainLight)
{
light.SetActive(false);
}
var door = mainDoor.GetComponent<WW_Door>();
door._animator.SetBool("Open", false);
}
}
}