void Start() { player = GameObject.Find("Player"); playerScript = player.GetComponent <Player>(); controllerScript = player.GetComponent <Controller2D>(); aiHandler = transform.parent.GetComponent <AiHandler>(); }
void Start() { canSee = true; player = GameObject.Find("Player").transform; patrollScript = gameObject.GetComponent <AiPatrolling>(); aiHandler = gameObject.GetComponent <AiHandler>(); bCollider = gameObject.GetComponent <BoxCollider2D>(); sRenderer = transform.GetComponentInChildren <SpriteRenderer>(); pSystem = transform.GetChild(1).GetChild(0).GetComponent <ParticleSystem>().main; animator = this.transform.GetComponentInChildren <Animator>(); }
void Start() { startPosition = transform.position; startRotation = transform.rotation; startDirection = aiDirection; startSpeed = speed; isMoving = true; shootRays = true; canTransform = true; isMimic = (mimic)?true:false; animator = this.transform.GetComponentInChildren <Animator>(); myTrans = this.transform; myBoxCol = this.GetComponent <BoxCollider2D>(); grumpyScript = (GetComponent <AiGrumpy>() == null)?null:GetComponent <AiGrumpy>(); aiHandler = GetComponent <AiHandler>(); InitiateAi(); }
void Start() { handler = transform.parent.GetComponent <AiHandler>(); }
private void Start() { ai = transform.parent.GetComponent <AiHandler>(); }