コード例 #1
0
        public void EnemyAttack(Transform target)
        {
            if (IsDead)
            {
                return;
            }

            _musicBGManager.PlayAudio();

            if (Vector2.Distance(transform.position, target.position) < _attackDistance)
            {
                SetMove(target, _walkingSpeedChase);
                _combat.ShouldAttack();
                Rotate(target);
            }
            else
            {
                SetMove(target, _walkingSpeedChase);
                Rotate(target);
            }
        }
コード例 #2
0
ファイル: Player.cs プロジェクト: rollinorama/1jam-uno
 public void Attack()
 {
     _combat.ShouldAttack();
 }