mirror of
https://github.com/DerTyp7/fps-citybuild-unity.git
synced 2025-10-30 20:47:08 +01:00
merged mit noah und juilius
This commit is contained in:
@@ -4,6 +4,7 @@ using UnityEngine;
|
||||
|
||||
public class LightSwitch : Interactable
|
||||
{
|
||||
public GameObject GameManager;
|
||||
public Light m_Light;
|
||||
public bool isOn;
|
||||
|
||||
@@ -29,7 +30,16 @@ public class LightSwitch : Interactable
|
||||
public override void Interact()
|
||||
{
|
||||
isOn = !isOn;
|
||||
Debug.Log("Click Light");
|
||||
|
||||
if (isOn) {
|
||||
GameManager.GetComponent<EventLog>().CreateEvent("Licht2");
|
||||
}
|
||||
else
|
||||
{
|
||||
GameManager.GetComponent<EventLog>().CreateEvent("Licht1");
|
||||
}
|
||||
|
||||
//Debug.Log("Click Light");
|
||||
UpdateLight();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user