private void OnTriggerEnter(Collider other) { if (other.CompareTag("Enemy") && dash.GetDashing()) { playerController.EnemyDash(other.gameObject); } }
// Update is called once per frame void FixedUpdate() { playerStat.Death(); Stunnable(); if (!stunned) { if (Input.GetButtonDown("dash")) { dash.Plunge(); } if (!dash.GetDashing()) { SetAttacking(); if (!attacking) { Move(); } PlayerRotation(); FeetRotation(); attackTimer += Time.fixedDeltaTime; cleaveTimer += Time.fixedDeltaTime; if (Input.GetKeyDown("e")) { CheckMutations(); } if (Input.GetButtonDown("cleave") && MutationManager.Instance.TentacleMutation.CurrentLevel > 0 && cleaveTimer > cleaveCooldown) { Cleave(); } else if (Input.GetAxis("attack") > 0 && attackTimer > maxAttackCooldown / playerStat.GetAttackSpeed() / blood.GetAttackSpeedMod()) { if (MutationManager.Instance.DancingSwordMutation.CurrentLevel == 0) { Attack(); } else { DancingSword(); } } } } UpdateSlowEffects(Time.fixedDeltaTime); }