You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.1 KiB
57 lines
1.1 KiB
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class DoorLight : MonoBehaviour
|
|
{
|
|
public GameObject light1;
|
|
public GameObject light2;
|
|
public GameObject light3;
|
|
public GameObject light4;
|
|
public GameObject light5;
|
|
bool WSLState=false;
|
|
|
|
public void OpenLight() {
|
|
light1.SetActive(true);
|
|
light2.SetActive(true);
|
|
}
|
|
|
|
public void CloseLight() {
|
|
light1.SetActive(false);
|
|
light2.SetActive(false);
|
|
}
|
|
|
|
public void OpenWCLight() {
|
|
light3.SetActive(true);
|
|
}
|
|
|
|
public void CloseWCLight() {
|
|
light3.SetActive(false);
|
|
}
|
|
|
|
public void OpenWSLight()
|
|
{
|
|
WSLState = true;
|
|
light4.SetActive(true);
|
|
light5.SetActive(true);
|
|
}
|
|
|
|
public void CloseWSLight()
|
|
{
|
|
WSLState = false;
|
|
light4.SetActive(false);
|
|
light5.SetActive(true);
|
|
}
|
|
|
|
public void onClick() {
|
|
if (WSLState)
|
|
{
|
|
//TaskCenter.GetInstance().FinishTask(10);
|
|
CloseWSLight();
|
|
}
|
|
else {
|
|
OpenWSLight();
|
|
}
|
|
}
|
|
}
|