planetarium / NineChronicles

Unity client application for Nine Chronicles, a fully decentralized idle RPG powered by the community.
https://nine-chronicles.com/
GNU Affero General Public License v3.0
347 stars 146 forks source link

전투 관련 로직 개선 #4851

Open eugene-doobu opened 3 weeks ago

eugene-doobu commented 3 weeks ago

Discussed in https://github.com/planetarium/NineChronicles/discussions/4639

Originally posted by **eugene-doobu** March 25, 2024 전투와 관련된 개선안들을 작성합니다.

현재 전투에서 연출을 위해 사용하고 있는 값들이 전부 코드에 하드코딩 되어있습니다. 이 값들을 별도 스크립터블 오브젝트 파일로 분리하거나 프리팹에서 수정이 가능하도록 수정합니다.

예시: Stage.cs - CoStageEnd

                var enemies = GetComponentsInChildren<StageMonster>();
                if (enemies.Any())
                {
                    foreach (var enemy in enemies)
                    {
                        enemy.WinAsync().Forget();
                    }

                    // TODO: 하드코딩된 수치 이용하지 말고 데이터 관리
                    yield return new WaitForSeconds(1f);
                }