void Start()
 {
     objPlayer = GameObject.FindGameObjectWithTag("Player");
     // enable/disable NPCController script if attacking
     npc = gameObject.GetComponent<NPCController>();
     weapon = gameObject.GetComponent<Done_WeaponController>();
     flockControl = gameObject.transform.parent.GetComponent<FlockController>();
     flock = gameObject.transform.parent.GetComponent<Flock>();
     //	Debug.Log(npc.GetPlayerTransform().position + "player place");
 }
Exemple #2
0
 // Use this for initialization
 void Start()
 {
     _flockController          = transform.parent.gameObject;
     _flockControllerComponent = _flockController.GetComponent <FlockController>();
     _graphController          = GameObject.FindGameObjectWithTag("GraphController").GetComponent <GraphController>();
 }