public void Placaje() { animator.Play("CarnotaurusPreparing"); particulasCarga.SetActive(true); SoundManager.Instance.PlayCarnotaur(sfxCarga); attacking = true; dir = jugador.position - transform.position; dir.Normalize(); direction.transform.up = dir; if (patrol) { patrol.enabled = false; patrol.CancelInvoke(); } if (enemyFollow) { enemyFollow.enabled = false; enemyFollow.CancelInvoke(); } if (perceptionCollider) { perceptionCollider.enabled = false; } if (patrol) { patrol.enabled = false; patrol.CancelInvoke(); } mov = dir * velocidadPlacaje; rg.AddForce(mov, ForceMode2D.Impulse); //Debug.Log("vector de mov (spino): " + mov); Invoke(nameof(GetStunned), tiempoPlacaje); }
void Placaje() { animator.Play("SpinoPrepareRoll"); attacking = true; dir = jugador.position - transform.position; dir.Normalize(); direction.transform.up = dir; if (perceptionCollider) { perceptionCollider.enabled = false; } if (patrol) { patrol.enabled = false; patrol.CancelInvoke(); } mov = dir * velocidadPlacaje; rg.AddForce(mov, ForceMode2D.Impulse); //Debug.Log("vector de mov (spino): " + mov); Invoke(nameof(GetStunned), tiempoPlacaje); }