コード例 #1
0
ファイル: FollowState.cs プロジェクト: ycarowr/Tools
        private void FollowPlayer()
        {
            Vector3 target = GetPlayerPosition();

            Data.Debug.finalPosition = target;
            SetDestination(target);

            if (!IsPlayerInRange())
            {
                Fsm.Idle();
            }
            else if (IsPlayerInRangeToAttack())
            {
                Fsm.Attack();
            }
        }
コード例 #2
0
 public void Attack(Vector3 targetPosition) => Fsm.Attack(targetPosition);