private void AttackBehaviour(float playerDistance) { if (!CheckIfStateIsAllowed(BehaviourState.Attack)) { return; } mover.AdjustDirection(player.transform.position); attacker.Attack(player, collisionLayer); }
private bool UpdateCombat() { if (Input.GetMouseButton(1) && playerCursor.currentState != PlayerCursor.CursorType.UI) { mover.AdjustDirection(playerCursor.Position); fighter.Attack(scheduler, playerCursor); return(true); } return(false); }
private void RotateCharacter(Vector3 lookPoint) { mover.AdjustDirection(lookPoint); transform.Rotate(Vector3.up * castedAbility.animationRotationOffset); }