예제 #1
0
        private void AttackBehaviour(float playerDistance)
        {
            if (!CheckIfStateIsAllowed(BehaviourState.Attack))
            {
                return;
            }

            mover.AdjustDirection(player.transform.position);
            attacker.Attack(player, collisionLayer);
        }
예제 #2
0
        private bool UpdateCombat()
        {
            if (Input.GetMouseButton(1) && playerCursor.currentState != PlayerCursor.CursorType.UI)
            {
                mover.AdjustDirection(playerCursor.Position);
                fighter.Attack(scheduler, playerCursor);

                return(true);
            }
            return(false);
        }
예제 #3
0
 private void RotateCharacter(Vector3 lookPoint)
 {
     mover.AdjustDirection(lookPoint);
     transform.Rotate(Vector3.up * castedAbility.animationRotationOffset);
 }