Esempio n. 1
0
 public void RemoveShadowTrigger(ShadowTrigger trigger)
 {
     if (_ShadowTriggers.Contains(trigger))
     {
         _ShadowTriggers.Remove(trigger);
     }
 }
Esempio n. 2
0
 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;
 }
Esempio n. 4
0
    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();
    }
Esempio n. 6
0
    public void RemoveShadowTrigger(ShadowTrigger trigger)
    {
        if (_ShadowTriggers.Contains(trigger))
        {
            _ShadowTriggers.Remove(trigger);

            if (_ShadowTriggers.Count == 0)
            {
                _anyTriggersAlive = false;
            }
        }
    }