Skip to content

23.08#51

Open
atomlg wants to merge 4 commits into
HolyMonkey:masterfrom
atomlg:Atomlg
Open

23.08#51
atomlg wants to merge 4 commits into
HolyMonkey:masterfrom
atomlg:Atomlg

Conversation

@atomlg
Copy link
Copy Markdown

@atomlg atomlg commented Aug 24, 2021

No description provided.

Comment on lines +9 to +12
[SerializeField] private Transform[] _spawnPositions;
[SerializeField] private GameObject _enemyTemplate;
[SerializeField] private Transform _parent;
[SerializeField] private PlayerSpawner _playerSpawner;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Этого типа поля мы ставим выше обычно

Comment thread Assets/Scripts/EnemiesSpawner.cs Outdated
Comment on lines +14 to +15
public event Action<EnemyHealth> OnEnemyDied;
public event Action OnAllEnemiesDied;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EnemyDied
AllEnemiesDied

Comment thread Assets/Scripts/EnemiesSpawner.cs Outdated
Comment on lines +34 to +38
GameObject enemy = Instantiate(_enemyTemplate, _spawnPositions[i].position, Quaternion.identity, _parent);
EnemyHealth enemyHealth = enemy.GetComponent<EnemyHealth>();
enemyHealth.OnDied += OnDied;
EnemyMovement enemyMovement = enemy.GetComponent<EnemyMovement>();
enemyMovement.Init(_player);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нет гарантии что на шаблоне будут два этих компонента

Comment thread Assets/Scripts/EnemyMovement.cs Outdated
public void Init(Transform player)
{
_enemyHealth = GetComponent<EnemyHealth>();
_moveTarget = Random.insideUnitCircle * _randomOffset;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Дублирует 24-ую строчку

Comment thread Assets/Scripts/EnemyMovement.cs Outdated
Comment on lines +23 to +27
if (transform.position == _moveTarget)
_moveTarget = Random.insideUnitCircle * _randomOffset;
else
transform.position =
Vector3.MoveTowards(transform.position, _moveTarget, _maxDistanceDelta * Time.deltaTime);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

С Else выглядит так себе

Comment thread Assets/Scripts/EnemyMovement.cs Outdated
public class EnemyMovement : MonoBehaviour
{
private Vector3 _moveTarget;
private Transform _player;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Зависит противника от игрока плохая идея

Comment thread Assets/Scripts/FadeScreen.cs Outdated
Comment thread Assets/Scripts/PlayerMovement.cs Outdated
Comment on lines +25 to +34
if (_hasMaxSpeed)
{
_currentTime -= Time.deltaTime;
if (_currentTime < 0)
{
_hasMaxSpeed = false;
_speed /= 2;
}
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужна возможность поднять несколько бустеров

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants