예제 #1
0
        /// <summary>
        /// 한 프레임 갱신
        /// </summary>
        /// <param name="byFrameOver">노래 프레임 따라잡기용인가?</param>
        private void UpdatePlayFrame(bool byFrameOver)
        {
            // 프레임 갱신
            _Frame++;
            _FrameByOver = byFrameOver;

            // 세부 갱신
            _logic.UpdatePlayContext();

            // 이동 물체들 갱신
            // 보통 플레이어기가 샷을 생성하고 적기가 탄을 생성하므로 이 순서로 갱신
            // Hit 체크도 업데이트 순서대로 수행
            UpdateMoverList(_Players, _FrameByOver);
            UpdateMoverList(_Shots, _FrameByOver);
            UpdateMoverList(_Enemys, _FrameByOver);
            UpdateMoverList(_Bullets, _FrameByOver);
            UpdateMoverList(_Effects, _FrameByOver);

            // UI 갱신
            if (!_FrameByOver)
            {
                if (_totalFrame > 0)
                {
                    _uiProgressBar.SetRate((float)_Frame / (float)_totalFrame);
                }
            }
        }
예제 #2
0
        public void UpdatePlay()
        {
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                OnExitGame();
                return;
            }

            _logic.UpdatePlayContext();

            UpdateMoverList(players);
            UpdateMoverList(_Shots);
            UpdateMoverList(_Enemys);
            UpdateMoverList(_Bullets);
            UpdateMoverList(_Effects);
        }