Ejemplo n.º 1
0
        bool IsPositionInTurnChunksNullArea(int pos)
        {
            if (pos < Constants.turningTerm)
            {
                return(false);
            }

            StageEditorST sest = FindEditSTByPos(pos);

            if (sest != null)
            {
                return(false);               //뭐라도 있으니까 상관없음.
            }
            //널인 경우라면.  회전 청크 보간 청크라서 널인지를 파악
            //4는 굉장히 회전 청크의 상태에 의존한 값임!
            for (int i = -1; i >= -4; i--)
            {
                sest = FindEditSTByPos(pos + i);
                if (sest != null && sest.IsTurnChunks())
                {
                    return(true);
                }
            }
            return(false);
        }
Ejemplo n.º 2
0
        void ModerateListForTurnChunks(int pos)//pos는 회전 청크가 생긴 지점.
        {
            StageEditorST sest = FindEditSTByPos(pos);

            if (sest.whichTurn == E_WhichTurn.NOT_TURN)
            {
                ErrorManager.SpurtError("회전 청크도 아닌데 지우겠다고");
            }

            for (int i = 1; i < Constants.turningTerm; i++)
            {
                if (i < 5)  //새로 생긴 회전 청크를 위해 비워두는 구간.
                {
                    sest = FindEditSTByPos(pos + i);
                    if (sest != null)   //여기 뭔가 있으면
                    {
                        sest.ReadyForGrave();
                        EditSTList.Remove(sest);
                    }
                }
                //이후 애들은 터닝텀에 걸리므로 턴청크일때 삭제해줘야함.
                else
                {
                    sest = FindEditSTByPos(pos + i);
                    if (sest != null && sest.IsTurnChunks())
                    {
                        sest.ReadyForGrave();
                        EditSTList.Remove(sest);
                    }
                }
            }
        }
Ejemplo n.º 3
0
        void ClearAndShowChunks()
        {
            DisappearAllChunks();
            if (position < Constants.firstObjSpawn)
            {
                ErrorManager.SpurtError("포지션이 2보다 작음!!");
            }

            if (position == Constants.firstObjSpawn)
            {
                ClearAndStartingShowChunks();
                return;
            }

            if (startingBlock.activeSelf == true)
            {
                startingBlock.SetActive(false);
            }


            for (int i = 0; i < candidates.Length; i++)
            {
                if (i == 0 && IsPositionInTurnChunksNullArea(position + candidates[0]))
                {
                    continue;
                }

                StageEditorST sest =
                    MakeChunk(candidates[i], position);
                if (sest.IsTurnChunks())                     //회전 청크가 나오면 그만만듦
                {
                    break;
                }
            }
        }
Ejemplo n.º 4
0
 public bool CanItBeTurnChunks()
 {
     if (position < Constants.turningTerm)
     {
         return(false);
     }
     for (int i = -1; i > -Constants.turningTerm; i--)    //전 터닝텀 구간 까지 터닝 청크가 있는지 체크.
     {
         StageEditorST sest = FindEditSTByPos(position + i);
         if (sest != null && sest.IsTurnChunks())
         {
             return(false);
         }
     }
     return(true);
 }
Ejemplo n.º 5
0
        void PosAdjustByTurnChunkInFront()
        {
            if (position < Constants.turningTerm - 1)
            {
                position++;
                return;
            }

            StageEditorST sest = FindEditSTByPos(position); //현재 포지션이 턴청크라면!

            if (sest != null && sest.IsTurnChunks())
            {
                position += 5;    //턴청크 구간 점프
            }
            else
            {
                position++;
            }
        }
Ejemplo n.º 6
0
        void ClearAndShowChunks()
        {
            DisappearAllChunks();
            //받은 포지션 값의 청크가 회전 청크인지, 그 범위에 포함인지, 등을 알아내어 적절한 처리를 꼭 해줄것!!

            if (position < Constants.firstObjSpawn)
            {
                ErrorManager.SpurtError("포지션이 2보다 작음!!");
            }

            if (position == Constants.firstObjSpawn)
            {
                ClearAndStartingShowChunks();
                return;
            }

            if (startingBlock.activeSelf == true)
            {
                startingBlock.SetActive(false);
            }


            for (int i = 0; i < candidates.Length; i++)
            {
                //-1 경우에만 전에 턴청크 때문에 안그려줘야하는지 체크해줄 필요가 있어.
                if (i == 0 && IsPositionInTurnChunksNullArea(position + candidates[0]))
                {
                    continue;
                }

                StageEditorST sest =
                    MakeChunk(candidates[i], position);
                if (sest.IsTurnChunks())                     //회전 청크가 나오면 그만만듦
                {
                    break;
                }
            }
        }