Exemplo n.º 1
0
 private void Start()
 {
     if (!m_PDSys)
     {
         m_PDSys = GetComponent <AIPlayerDetection>();
     }
     if (m_PDSys)
     {
         GetDirection();
     }
 }
Exemplo n.º 2
0
 // Use this for initialization
 private void Start()
 {
     if (!m_RB)
     {
         m_RB = GetComponent <Rigidbody2D>();
     }
     if (!m_PDSys)
     {
         m_PDSys = GetComponent <AIPlayerDetection>();
     }
     if (!m_Player)
     {
         m_Player = GameObject.FindWithTag("Player").GetComponent <PlayerController>();
     }
 }