void OnTriggerEnter2D(Collider2D hit)
 {
     if (hit.CompareTag(tagCollider))
     {
         MoveCamera.SetTarget(target, timeToFollow, velocityToTarget);
     }
 }
 void OnCollisionEnter2D(Collision2D hit)
 {
     if (hit.collider.CompareTag(tagCollider))
     {
         MoveCamera.SetTarget(target, timeToFollow, velocityToTarget);
     }
 }
Example #3
0
 void Start()
 {
     if (isEncubadora)
     {
         MoveCamera.SetTarget(transform, 10f, 10f);
     }
 }