-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
Separation of functions and actions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
함수 분리가 너무 잘 되어있어서 감동받았습니다.
OnCountChanged?.Invoke(); | ||
|
||
if (_count >= _maxCount) | ||
{ | ||
OnCountMax?.Invoke(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아니 이런 연산자가 있다니 null 체크??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이거 엄청 자주 쓰는 것 같아요 되게 좋습니다..?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
잘 봤습니다!!!
private float _count; | ||
private readonly float _maxCount; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
질문 있슴니다.........
변수명 앞에 붙은 _ 이런 표시는 클래스 내에서 전역적으로 쓰일 때 붙여야 하는거야?
전역변수 private 으로 선언될 때 쓰는 규칙인가요...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
카멜표기법이라고 부르는데 간단하게 멤버 private은 _로 구분하고 public, protected는 붙이지 않는 것
정리 잘된 블로그 글이라 이거 보며 조금 이해될거야
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
헐 고마워...! 당장 읽어볼게
중복 코드랑 TimeLogic자체가 Counter로 사용 가능해서 삭제. |
Separation of functions and actions
기능과 행동을 분리하고.. 코드 전체적으로 다듬었습니다..