Skip to content

Code refactoring#32

Open
Skiedas wants to merge 1 commit into
HolyMonkey:masterfrom
Skiedas:Refactoring
Open

Code refactoring#32
Skiedas wants to merge 1 commit into
HolyMonkey:masterfrom
Skiedas:Refactoring

Conversation

@Skiedas
Copy link
Copy Markdown

@Skiedas Skiedas commented Feb 1, 2021

No description provided.

Comment on lines +8 to +13
public event UnityAction<Enemy> EnemyDying;

public void Dying()
{
EnemyDying?.Invoke(this);
}
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.

Почему ing?

{
Enemy spawned = Instantiate(_template, Random.insideUnitCircle * _spawnRadius, Quaternion.identity);
spawned.EnemyDying += OnEnemyDying;
_enemySpawned++;
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.

?

_enemySpawned++;
}

_enemyLeft = _enemySpawned;
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 on lines +12 to +13
private int _enemySpawned;
private int _enemyLeft;
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 on lines +17 to +25
if (_timer)
{
_timeLeft -= Time.deltaTime;
if (_timeLeft <= 0)
{
_timer = 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.

не сработает если поднять несколько бустеров подряд

Comment on lines +16 to +26
if (Input.GetKey(KeyCode.W))
Move(Vector3.up);

if (Input.GetKey(KeyCode.S))
Move(Vector3.down);

if (Input.GetKey(KeyCode.A))
Move(Vector3.left);

if (Input.GetKey(KeyCode.D))
Move(Vector3.right);
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