示例#1
0
 protected virtual void Awake()
 {
     if (m_TargetTracker == null)
     {
         m_TargetTracker = GetComponent <TargetTracker>();
     }
 }
示例#2
0
        private void Awake()
        {
            bool isEnemy = ((1 << gameObject.layer) & Layers.EnemyMask) != 0;

            m_ScanLayerMask = isEnemy ? Layers.PlayerMask : Layers.EnemyMask;

            if (m_TargetTracker == null)
            {
                m_TargetTracker = GetComponent <TargetTracker>();
            }
        }