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

[Day 20-1] 장교 구현 완료 및 국제 관계UI 참전 기능 일부 수정

by 진현개발일기 2021. 8. 1.

[2021. 08. 01, Sun]

 

오늘 오전 중에 한 일들이다. 

Works ive done in the afternoon today.

 

1. 장교 구현 및 장교가 속한 부대의 이점

   Came up with 'Army Officer' class and benefits of owning it for troops belonged to.

   (Rank from 2nd Lieutenant to General)

 

2. 유닛 구매 시 국방력 순위에 끼치는 영향.

    Immediate effects on Conventional Forces Rank from purchasing units.

 

3. 국제 관계UI중 전쟁 참여 기능 리팩토링.

   Refactored war engagement-related funcs in Int'l ties UI.

 

 

[ 장교, General ]

필요할 때만 관련된 함수를 실행시킨다.
장교 생성 시 이름이 랜덤으로 부여된다.
계급이다.

장교를 클릭 시 유닛을 구매할 때 $ 3M 추과금이 발생한다.

Extra $3M will be charged when you hire officer.

 

성공 1
장교 진급 시 이점
히든 장교 또한 구성되어있다.

 

 

[ 국방력 순위 , Rank of Conventional Forces ]

랭크 관리자 병사 수는 현재 배치 가능한 병사의 수이다.  

2nd Debug stands for the number of dispatchable units. 

 

그런데 문제가 있었다. 배치를 하고나서도 현재 보유중인 유닛의 수가 계속 같은 숫자로 증가하는 것이다.

But there was an issue from the get go. even after i dispatched units, the increase in the number of soldiers kept happening.

 

 

 

원인을 디버깅을 통해 찾았다.

Figured out the cause

 

 

 

'내 유닛들' 리스트에 추가하는 함수가 두 개가 있었다.

There were 2 funcs in the same role of adding Unit to MyUnits.

 

 

[ 전쟁 참여 리팩토링  ,  Refactoring of War Engagement ]

 

실수로 index 오류를 내버려서 수정 후 모습이다.
성공

 

728x90