Ejemplo n.º 1
0
 void Start()
 {
     player           = GameObject.Find("Player");
     playerScript     = player.GetComponent <Player>();
     controllerScript = player.GetComponent <Controller2D>();
     aiHandler        = transform.parent.GetComponent <AiHandler>();
 }
Ejemplo n.º 2
0
 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>();
 }
Ejemplo n.º 3
0
    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();
    }
Ejemplo n.º 4
0
 void Start()
 {
     handler = transform.parent.GetComponent <AiHandler>();
 }
Ejemplo n.º 5
0
 private void Start()
 {
     ai = transform.parent.GetComponent <AiHandler>();
 }