Esempio n. 1
0
        private void AttackBehaviour(float playerDistance)
        {
            if (!CheckIfStateIsAllowed(BehaviourState.Attack))
            {
                return;
            }

            mover.AdjustDirection(player.transform.position);
            attacker.Attack(player, collisionLayer);
        }
Esempio n. 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);
        }
Esempio n. 3
0
 private void RotateCharacter(Vector3 lookPoint)
 {
     mover.AdjustDirection(lookPoint);
     transform.Rotate(Vector3.up * castedAbility.animationRotationOffset);
 }