Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Refactor: Mission Class #88

Merged
merged 3 commits into from
Apr 11, 2023
Merged

Refactor: Mission Class #88

merged 3 commits into from
Apr 11, 2023

Conversation

fkdl0048
Copy link
Contributor

Separation of functions and actions

기능과 행동을 분리하고.. 코드 전체적으로 다듬었습니다..

Separation of functions and actions
Copy link
Collaborator

@ccmuk58 ccmuk58 left a comment

Choose a reason for hiding this comment

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

함수 분리가 너무 잘 되어있어서 감동받았습니다.

Comment on lines 21 to 26
OnCountChanged?.Invoke();

if (_count >= _maxCount)
{
OnCountMax?.Invoke();
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

아니 이런 연산자가 있다니 null 체크??

Copy link
Contributor Author

Choose a reason for hiding this comment

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

이거 엄청 자주 쓰는 것 같아요 되게 좋습니다..?!

Copy link
Collaborator

@kyoonge kyoonge left a comment

Choose a reason for hiding this comment

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

잘 봤습니다!!!

Comment on lines +8 to +9
private float _count;
private readonly float _maxCount;
Copy link
Collaborator

Choose a reason for hiding this comment

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

질문 있슴니다.........
변수명 앞에 붙은 _ 이런 표시는 클래스 내에서 전역적으로 쓰일 때 붙여야 하는거야?
전역변수 private 으로 선언될 때 쓰는 규칙인가요...?

Copy link
Contributor Author

@fkdl0048 fkdl0048 Apr 11, 2023

Choose a reason for hiding this comment

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

카멜표기법이라고 부르는데 간단하게 멤버 private은 _로 구분하고 public, protected는 붙이지 않는 것

정리 잘된 블로그 글이라 이거 보며 조금 이해될거야

Copy link
Collaborator

Choose a reason for hiding this comment

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

헐 고마워...! 당장 읽어볼게

@fkdl0048
Copy link
Contributor Author

중복 코드랑 TimeLogic자체가 Counter로 사용 가능해서 삭제.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants