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

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