Esempio n. 1
0
 private void OnTriggerExit2D(Collider2D collision)
 {
     if (_deactivateOnExit && collision.CompareTag(TagManager.GetTag(_tagType)))
     {
         Activation(false);
     }
 }
Esempio n. 2
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.CompareTag(TagManager.GetTag(_tagType)))
     {
         Activation(true);
     }
 }
 private void OnTriggerExit2D(Collider2D collision)
 {
     if (_deactivateOnExit && collision.CompareTag(TagManager.GetTag(_tagType)))
     {
         for (var index = 0; index < _objects.Length; index++)
         {
             var obj = _objects[index];
             obj.SetActive(false);
         }
     }
 }
Esempio n. 4
0
        // [SerializeField] private CinemachineTargetGroup _targetGroup;

        private void OnTriggerEnter2D(Collider2D collision)
        {
            if (collision.CompareTag(TagManager.GetTag(_activatorTag)))
            {
                for (var index = 0; index < _objects.Length; index++)
                {
                    var obj = _objects[index];
                    obj.SetActive(true);
                }
            }


            //if (_targetGroup)
            //{
            //    foreach (var targetGroupMTarget in _targetGroup.m_Targets)
            //    {
            //        Debug.Log(targetGroupMTarget.target.name);
            //    }
            //}

            // _targetGroup.m_Targets.Add(target)
        }