Version5#34
Open
Zlobik wants to merge 2 commits into
Open
Conversation
.......For me
HolyMonkey
requested changes
Feb 13, 2021
Comment on lines
+10
to
+12
| public int EnemiesOnLevel { get; private set; } | ||
|
|
||
| public int KilledEnemys { get; private set; } = 0; |
Owner
There was a problem hiding this comment.
Можно обойтись одним состоянием: оставшиеся на уровне
| using System.Collections; | ||
| using System.Linq; | ||
|
|
||
| public class Player : MonoBehaviour |
Owner
There was a problem hiding this comment.
Слишком много ответственностей
| EnemiesOnLevel--; | ||
|
|
||
| if (EnemiesOnLevel == 0) | ||
| OnLevelPassed(); |
| { | ||
| if (collision.GetComponent<Square>()) | ||
| { | ||
| EnemiesOnLevel--; |
Owner
There was a problem hiding this comment.
Возможно это тоже не его ответственность
Comment on lines
+43
to
+46
| private void ChangeSpeed (float speed) | ||
| { | ||
| _speed = speed; | ||
| } |
Comment on lines
+29
to
+41
| private IEnumerator Booster () | ||
| { | ||
| var waitForSeconds = new WaitForSeconds(_boosterTime); | ||
| ChangeSpeed(_speed + _boosterForce); | ||
|
|
||
| for (int i = 0; i < 1; i++) | ||
| { | ||
| yield return waitForSeconds; | ||
| } | ||
|
|
||
| ChangeSpeed(_defaultSpeed); | ||
| StopCoroutine(Booster()); | ||
| } |
Comment on lines
+22
to
+23
| _boosterForce = squareBooster.BoosterForce; | ||
| _boosterTime = squareBooster.BoosterTime; |
Owner
There was a problem hiding this comment.
В полях это хранить не надо, надо передать методу
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.