728x90
반응형
[기획서 수정사항]
블록 생성 알고리즘 변경. 현재 남은 보드 칸에 따라 생성될 수 있는 블록에 제한되도록 수정 및 도전모드, 기본모드의 블록생성 알고리즘 서로 다르게 수정
기본모드
- 남은 칸 수 40 이하 - 어려움 블록 생성x
- 남은 칸 수 30 이하 - 보통 블록 생성x
private ShapeInfo.ShapeSt StandardModeValidation(ShapeInfo.ShapeSt shapeSt, int count, int index)
{
if (count <= 30) shapeSt = CreateShapeDefaultLevel(index);
else if (count <= 40) shapeSt = CreateShapeNormalLevel(index);
return shapeSt;
}
도전모드
- 남은 칸 수 60 이하 - 어려움 블록 생성x
- 남은 칸 수 40 이하 - 보통 블록 생성x
private ShapeInfo.ShapeSt ChallengeModeValidation(ShapeInfo.ShapeSt shapeSt, int count, int index)
{
if (count <= 40) shapeSt = CreateShapeDefaultLevel(index);
else if (count <= 60) shapeSt = CreateShapeNormalLevel(index);
return shapeSt;
}
- CreateShapeDefaultLevel
private ShapeInfo.ShapeSt CreateShapeDefaultLevel(int index)
{
ShapeInfo.I.shapesIndex[index] = UnityEngine.Random.Range(0, 28);
ShapeInfo.ShapeSt shapeSt = ShapeInfo.I.GetSeletShape(ShapeInfo.I.shapesIndex[index]);
shapeSt = CreateShapeExistNameValidation(shapeSt, index, 28);
return shapeSt;
}
- CreateShapeNormalLevel
private ShapeInfo.ShapeSt CreateShapeNormalLevel(int index)
{
ShapeInfo.I.shapesIndex[index] = UnityEngine.Random.Range(0, 34);
ShapeInfo.ShapeSt shapeSt = ShapeInfo.I.GetSeletShape(ShapeInfo.I.shapesIndex[index]);
shapeSt = CreateShapeExistNameValidation(shapeSt, index, 34);
return shapeSt;
}
기존 같은 블록 로직이 블록 생성 로직 안에 있었는데 분리하고 각 모드 별 검증로직 추가
private ShapeInfo.ShapeSt CreateShapeExistNameValidation(ShapeInfo.ShapeSt shapeSt, int index, int max)
{
while (index > 0 && shapeSt.name == ShapeInfo.I.GetSeletShape(ShapeInfo.I.shapesIndex[index - 1]).name ||
index > 1 && shapeSt.name == ShapeInfo.I.GetSeletShape(ShapeInfo.I.shapesIndex[index - 2]).name)
{
ShapeInfo.I.shapesIndex[index] = UnityEngine.Random.Range(0, max);
shapeSt = ShapeInfo.I.GetSeletShape(ShapeInfo.I.shapesIndex[index]);
}
return shapeSt;
}
블록 난이도별 최대 생성갯수 제한 수정
- 어려움 그룹의 블록은 최대 1개 생성 및 보통 그룹 최대 2개 생성
private ShapeInfo.ShapeSt CreateShapeLevelValidation(ShapeInfo.ShapeSt shapeSt)
{
int count = 0;
for (int i = 0; i < ShapeInfo.I.shapesIndex.Length; i++)
{
if (ShapeInfo.I.shapesIndex[i] >= 34) count++;
if (count == 2)
{
ShapeInfo.I.shapesIndex[i] = UnityEngine.Random.Range(0, 28);
shapeSt = ShapeInfo.I.GetSeletShape(ShapeInfo.I.shapesIndex[i]);
shapeSt = CreateShapeExistNameValidation(shapeSt, i, 28);
}
}
return shapeSt;
}
신기록 달성 정산 시에 발생하는 폭죽 효과 지속을 5초로 제한.
- 이미 구현되어 있음.
[Unity Devcamp] 0323 개발일지
[기획수정] 신기록 달성 시 나오는 폭죽효과 5초만 지속되도록 수정 기존에 Particle 구현시 Looping에 체크되있어 반복되도록 설정되어있어 체크제거하여 반복되지 않게 수정 Start Lifetime을 5로 수정
jang-kroed.tistory.com
[UI 명세서 및 미리보기 수정사항]
BGM ON/OFF 기능 삭제에 따른 옵션 메뉴 변경
- 옵션메뉴 이미지 누락으로 배경음 버튼 및 기능 삭제만 구현
도전모드 결과에 따라 정산화면 변경 추가
- 이미지 누락으로 미구현
728x90
반응형
'개발일지 > TIL' 카테고리의 다른 글
[Unity Devcamp] 0327 개발일지 (0) | 2023.03.28 |
---|---|
[Unity Devcamp] 0328 개발일지 (0) | 2023.03.28 |
[Unity Devcamp] 0323 개발일지 (0) | 2023.03.23 |
[Unity Devcamp] 0322 개발일지 (0) | 2023.03.23 |
[Unity Devcamp] 0321 개발일지 (0) | 2023.03.21 |