コード例 #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);
 }