본문 바로가기
개발 (Game)/(2021) Unity RTS 포트폴리오

[Day 11-2] 메인 메뉴 제작 완료, 국가 및 목표 선택

by 진현개발일기 2021. 7. 22.

[2021. 07. 22, Thu]

 

오늘부터 한글, 영어로 블로그 글을 써볼려고 노력해보겠다. 감을 잃고 싶지 않아서이다. 혹시 모른가 나중에 외국계 기업에 지원할 때 도움이 될지도 ㅎㅎ

From today I'll post both in Korean and English not to lose sense of english skills. Furthermore, God only knows if I would apply for companies overseas, then this can be a reference in my resume.

 

 

 

맨 처음 메뉴 화면 (Main Menu)
게임 시작시 세팅 UI (Game Setting UI)
PlayerManager.cs

은닉성을 위해서 최대한 프라이빗으로 설정해놨고 함수들로 접근 가능하게 해놨다.

In the interest of concealment, I made most of the variables private leaving accessibilities via public Funcs.

 

밑줄친 변수는 추후에 국가 선택을 할 때 쓰인다.

the underlined will be used when the player choose a nation

UI ButtonManager의 국가 선택 함수
결정완료 클릭 시

 

 

[리팩토링 전]

[Before refactoring]

 

리팩토링 전 목표 선택 힘수 (ButtonManager.cs)

[리팩토링 후]

[After refactoring]

리팩토링 후 목표 선택 함수(ButtonManger.cs)

 

선택이 되었다.

코드가 정상적으로 작동하는 것을 확인할 수 있다.

it works well as you can see.

 

 

▲ 나라 선택 시 저장되어있던 정보에 따라서 필요한 경우에 딱 한 번만 플레이어의 나라를 찾아 등록한다.

    it finds out the player-selected nation in World scene with the saved information beforehand.

it worked well

728x90