Exemple #1
0
 public void Tick()
 {
     if (_gameStateUseCase.IsEqual(GameState.Draw) && _inputUseCase.IsInputScreen())
     {
         // カーソル移動
         var mousePosition = _inputUseCase.GetInputPosition();
         _cursorView.Move(mousePosition);
     }
 }
Exemple #2
0
        public void Tick()
        {
            if (_gameStateUseCase.IsEqual(GameState.Draw) == false)
            {
                return;
            }

            _interval += Time.deltaTime;
            if (_interval > FieldParameter.INTERVAL * 4.0f)
            {
                _interval = 0.0f;
                _enclosureFactoryUseCase.Activate();
            }
        }
        private UniTask MoveAsync(Vector3 moveVector, CancellationToken token)
        {
            return(UniTask.WaitWhile(() =>
            {
                if (_isEnclose)
                {
                    return false;
                }

                if (_gameStateUseCase.IsEqual(GameState.Draw))
                {
                    transform.position += moveVector * Time.fixedDeltaTime * _moveSpeed;
                }

                var y = transform.position.y;
                return
                y > FieldParameter.yPoints[0] - FieldParameter.INTERVAL &&
                y < FieldParameter.yPoints.GetLastParam() + FieldParameter.INTERVAL;
            }, PlayerLoopTiming.FixedUpdate, token));
        }