public void SetDependencies(GameState gameState, ProjectileFactory projectileFactory,
                             IInputSystem inputSystem, ProjectileDataContainer projectileDataContainer, QTEController qteController, AudioManager audioManager)
 {
     _spriteRenderer      = GetComponent <SpriteRenderer>();
     _gameState           = gameState;
     _qteController       = qteController;
     _rigidBody2d         = GetComponent <Rigidbody2D>();
     _animationController = new AnimationController(_animator);
     _movementController  = new MovementController(_rigidBody2d, _data, gameState, transform, _animationController);
     _shootingController  = new ShootingController(projectileFactory, _shootingPivot, gameState, inputSystem,
                                                   projectileDataContainer, _data, transform, _arm, audioManager);
 }
Esempio n. 2
0
 public ShootingController(ProjectileFactory projectileFactory, Transform shootingPivot,
                           GameState state, IInputSystem inputSystem,
                           ProjectileDataContainer projectileDataContainer,
                           CharacterControllerData data,
                           Transform transform, Transform arm, AudioManager audioManager)
 {
     _projectileFactory       = projectileFactory;
     _shootingPivot           = shootingPivot;
     _state                   = state;
     _inputSystem             = inputSystem;
     _projectileDataContainer = projectileDataContainer;
     _data         = data;
     _transform    = transform;
     _arm          = arm;
     _audioManager = audioManager;
 }