void Awake() { playerController = FindObjectOfType <PlayerController>(); npcAnim = GetComponent <Animator>(); npc = transform.gameObject; // npc radius outerRadiusScript = GetComponentInChildren <OuterRadiusScript>(); // game controller gameController = GameObject.FindGameObjectWithTag("GameController"); textBoxManager = gameController.GetComponent <StaticTextBoxManager>(); // player controller player = GameObject.FindGameObjectWithTag("Player"); }
void Awake() { NPC = transform.parent.GetComponent <OuterRadiusScript>(); // get parent script... not needed for static variable. only name script }