// Use this for initialization void Start() { m_parentHealth = GetComponentInParent <AIHealth>(); networkedAI = GetComponentInParent <NetworkedAI>(); if (networkedAI != null) { aiType = networkedAI.aiType; } }
// Use this for initialization void Start() { cannonController = GetComponentInChildren <AICannonController>(); networkAI = GetComponentInParent <NetworkedAI>(); if (networkAI != null) { aiType = networkAI.aiType; } else { Debug.LogError("NetworkedAI was unable to be found in parent."); } }
// Use this for initialization void Start() { cannonController = GetComponentInChildren<AICannonController>(); networkAI = GetComponentInParent<NetworkedAI>(); if (networkAI != null) { aiType = networkAI.aiType; } else { Debug.LogError("NetworkedAI was unable to be found in parent."); } }
// Use this for initialization void Start() { m_parentHealth = GetComponentInParent<AIHealth>(); networkedAI = GetComponentInParent<NetworkedAI>(); if (networkedAI != null) { aiType = networkedAI.aiType; } }