Ejemplo n.º 1
0
        public void GenerateTurnChunks(E_WhichTurn whichTurn, float turningPoint)
        {
            Vector3 pos = new Vector3(0f, 0f, turningPoint - (2 * MapObjManager.GetInstance().GetChunkMargin()));

            this.whichTurn    = whichTurn;
            this.turningPoint = turningPoint;
            if (whichTurn == E_WhichTurn.LEFT)
            {
                whereToTurn = leftTurnChunks.transform.Find("TurningPoint");
                leftTurnChunks.transform.position = pos;
                whereToTurn.transform.rotation    = originRot;
                leftTurnChunks.SetActive(true);
            }
            else if (whichTurn == E_WhichTurn.RIGHT)
            {
                whereToTurn = rightTurnChunks.transform.Find("TurningPoint");
                rightTurnChunks.transform.position = pos;
                whereToTurn.transform.rotation     = originRot;
                rightTurnChunks.SetActive(true);
            }
            else
            {
                Debug.Log("턴파트에서 오류001");
            }
        }
Ejemplo n.º 2
0
        private void Start()
        {
            showCandidates = new ShowCandidate[Constants.wantToShowNumOfChunks];

            for (int i = 0; i < showCandidates.Length; i++)                                         //청크 후보 자리 초기화
            {
                showCandidates[i].pos       = ((-1 * Constants.wantToShowNumOfChunksInBehind) + i); //후방과 전방에 놓을 청크의 수 저장
                showCandidates[i].alreadyIn = false;
            }
            margin = MapObjManager.GetInstance().GetChunkMargin();
            if (margin == 0)
            {
                ErrorManager.SpurtError();
            }
            marginDiv = 1 / margin;
        }
Ejemplo n.º 3
0
 private void Start()
 {
     speed     = 50.0f;
     margin    = MapObjManager.GetInstance().GetChunkMargin();
     posMargin = margin * 1.7f;
 }