Initial commit
This commit is contained in:
22
code-csharp/en_US/TRIG_KITCHENTOGGLE.cs
Normal file
22
code-csharp/en_US/TRIG_KITCHENTOGGLE.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class TRIG_KITCHENTOGGLE : MonoBehaviour
|
||||
{
|
||||
public LivingRoom_KitchenController Kitchen;
|
||||
|
||||
private void OnTriggerEnter2D(Collider2D other)
|
||||
{
|
||||
if ((bool)other.GetComponent<PlayerManager>())
|
||||
{
|
||||
Kitchen.KitchenVisible = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTriggerExit2D(Collider2D other)
|
||||
{
|
||||
if ((bool)other.GetComponent<PlayerManager>())
|
||||
{
|
||||
Kitchen.KitchenVisible = false;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user