public void RemoveShadowTrigger(ShadowTrigger trigger) { if (_ShadowTriggers.Contains(trigger)) { _ShadowTriggers.Remove(trigger); } }
public void AddShadowTrigger(ShadowTrigger trigger) { if (!_ShadowTriggers.Contains(trigger)) { _ShadowTriggers.Add(trigger); } }
void Start() { shadowAreaTrigger = GetComponent <ShadowTrigger>(); shadowAreaTrigger.OnShadowEnter = OnShadowEnter; shadowAreaTrigger.OnShadowStay = OnShadowStay; shadowAreaTrigger.OnShadowExit = OnShadowExit; }
public void AddShadowTrigger(ShadowTrigger trigger) { if (!_ShadowTriggers.Contains(trigger)) { _ShadowTriggers.Add(trigger); _anyTriggersAlive = true; } }
public override void OnInspectorGUI() { serializedObject.Update(); ShadowTrigger ShadowTrigger = (ShadowTrigger)target; ShadowTrigger.DetectShadow = EditorGUILayout.Toggle("Detect shadow", ShadowTrigger.DetectShadow); ShadowTrigger.DetectLight = EditorGUILayout.Toggle("Detect light", ShadowTrigger.DetectLight); serializedObject.ApplyModifiedProperties(); }
public void RemoveShadowTrigger(ShadowTrigger trigger) { if (_ShadowTriggers.Contains(trigger)) { _ShadowTriggers.Remove(trigger); if (_ShadowTriggers.Count == 0) { _anyTriggersAlive = false; } } }