Exemple #1
0
 // Start is called before the first frame update
 void Start()
 {
     //El rigidbody se puede utilizar para rigidbody
     _boxCollider     = GetComponent <BoxCollider>();
     chomperAnimation = GetComponent <ChomperAnimation>();
     rotate           = false;
 }
Exemple #2
0
 // Start is called before the first frame update
 void Start()
 {
     rigidbody        = GetComponent <Rigidbody>();
     chomperAnimation = GetComponent <ChomperAnimation>();
     enemyPosition    = GameObject.FindGameObjectWithTag("Player").transform;
     orientNeeded     = true;
 }
Exemple #3
0
 // Start is called before the first frame update
 void Start()
 {
     _boxCollider      = GetComponent <BoxCollider>();
     chomperAnimation  = GetComponent <ChomperAnimation>();
     sqrDistanceToStop = distanceToStop * distanceToStop;
     State             = AIState.Patrol;
     ChooseWayPoint();
 }
Exemple #4
0
 private void setAnimation(ChomperAnimation newAnim)
 {
     if (oldChomperAnimation != newAnim)
     {
         oldChomperAnimation = newAnim;
         anim.SetInteger(HASH_PARAM_ANIM_STATE, (int)newAnim);
     }
 }
Exemple #5
0
 void Start()
 {
     sqrVisionDistance = visionDistance * visionDistance;
     sqrDistanceAttack = distanceToAttack * distanceToAttack;
     controller        = GetComponent <ChomperController>();
     animation         = GetComponent <ChomperAnimation>();
     controller.player = GameObject.FindGameObjectWithTag("Player").transform;
 }
Exemple #6
0
    // Start is called before the first frame update
    void Start()
    {
        rigidbody        = GetComponent <Rigidbody>();
        chomperAnimation = GetComponent <ChomperAnimation>();
        // rotate = false;
        indexObj      = 0;
        m_GameManager = GameObject.FindGameObjectWithTag("GameManager");
        player        = GameObject.FindGameObjectWithTag("Player").transform;

        objetivo = Mojones[indexObj];
    }
 // Start is called before the first frame update
 void Start()
 {
     rigidbody        = GetComponent <Rigidbody>();
     chomperAnimation = GetComponent <ChomperAnimation>();
     rotate           = false;
 }