// Update is called once per frame void Start() { wizardAnimator = gameObject.GetComponentInChildren <Animator> (); navAgent = gameObject.GetComponent <NavMeshAgent> (); wizard = gameObject.GetComponent <AIWizard> (); attackmMeans = gameObject.GetComponent <WizardAttackMeans> (); }
public void ChangeOwner(AIWizard owner) { if (ActiveOwner != null) { ActiveOwner.ballStolen(this.gameObject); } this.transform.parent = owner.transform; this.transform.localPosition = new Vector3(0f, 0f, 0f); ActiveOwner = owner; }
void Start() { aiwizard = gameObject.GetComponentInParent <AIWizard> (); shooting = false; }