From e9ea621b93fbb58d9edfca8375918791637bbd52 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 30 Dec 2020 20:59:04 +0800 Subject: +init --- Client/Assembly-CSharp/OneWayShadows.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Client/Assembly-CSharp/OneWayShadows.cs (limited to 'Client/Assembly-CSharp/OneWayShadows.cs') diff --git a/Client/Assembly-CSharp/OneWayShadows.cs b/Client/Assembly-CSharp/OneWayShadows.cs new file mode 100644 index 0000000..e5aff45 --- /dev/null +++ b/Client/Assembly-CSharp/OneWayShadows.cs @@ -0,0 +1,22 @@ +using System; +using UnityEngine; + +public class OneWayShadows : MonoBehaviour +{ + public Collider2D RoomCollider; + + public void Start() + { + LightSource.OneWayShadows.Add(base.gameObject, this); + } + + public void OnDestroy() + { + LightSource.OneWayShadows.Remove(base.gameObject); + } + + public bool IsIgnored(LightSource lightSource) + { + return this.RoomCollider.OverlapPoint(lightSource.transform.position); + } +} -- cgit v1.1-26-g67d0