// Use this for initialization void Start() { agent = GetComponent <NavMeshAgent>(); animator = GetComponentInChildren <Animator>(); player = GetComponentInParent <SteveController>(); player.OnAttack += OnAttack; }
// Use this for initialization void Start() { // get all character controllers player = GameObject.FindGameObjectWithTag("Player"); playerController = player.GetComponent<PlayerController> (); pierre = GameObject.Find ("Pierre"); pierreController = pierre.GetComponent<PierreController> (); steve = GameObject.Find ("Steve"); steveController = steve.GetComponent<SteveController> (); mia = GameObject.Find ("Mia"); miaController = mia.GetComponent<MiaController> (); john = GameObject.Find ("John"); johnController = john.GetComponent<JohnController> (); // start first action GoToAction ("player", 0); //GoToAction ("john", 1); }