// Update is called once per frame private void Update() { if (terremoto && Mathf.Abs(Target.velocity.y) < .05f) { Debug.Log("Terremoto Ejecutado"); CameraShakeCM.Temblor(5, 2, .3f); } }
private void CheckAttack() { Collider2D[] enemigos = Physics2D.OverlapCircleAll(attackChecker.position, radiusAttackCheck, enemigoLayer); if (enemigos.Length != 0) { foreach (Collider2D enemigo in enemigos) { LiveManager vida = enemigo.GetComponent <LiveManager>(); vida.reducirVida(10); } CameraShakeCM.Temblor(.5f, 2, .2f); } }