Ejemplo n.º 1
0
 public ScoreManager()
 {
     _roundManager = SceneContext.Instance.RoundManager;
     _roundManager.RoundCountdown        += OnRoundCountdown;
     _particlesManager                    = SceneContext.Instance.ParticlesManager;
     _particlesManager.ParticleDestroyed += OnParticleDestroyed;
 }
Ejemplo n.º 2
0
        public BoundsManager()
        {
            _camera                       = SceneContext.Instance.Camera;
            _particleSettings             = SceneContext.Instance.ParticleSettings;
            _roundManager                 = SceneContext.Instance.RoundManager;
            _roundManager.RoundCountdown += RecalculateBounds;

            RecalculateBounds();
        }
Ejemplo n.º 3
0
 private void Awake()
 {
     _updateManager    = new UpdateManager();
     _roundManager     = new RoundManager();
     _boundsManager    = new BoundsManager();
     _cursorManager    = new CursorManager();
     _particlesManager = new ParticlesManager();
     _scoreManager     = new ScoreManager();
 }
Ejemplo n.º 4
0
 public CursorManager()
 {
     _camera        = SceneContext.Instance.Camera;
     _updateManager = SceneContext.Instance.UpdateManager;
     _updateManager.Add(this);
     _roundManager = SceneContext.Instance.RoundManager;
     _roundManager.RoundCountdown += OnRoundCountdown;
     _roundManager.RoundGameOver  += OnRoundGameOver;
 }
Ejemplo n.º 5
0
 public UIController(Text textComponent, Text scoreComponent)
 {
     _textComponent  = textComponent;
     _scoreComponent = scoreComponent;
     _scoreComponent.gameObject.SetActive(false);
     _updateManager = SceneContext.Instance.UpdateManager;
     _updateManager.Add(this);
     _roundManager = SceneContext.Instance.RoundManager;
     _roundManager.RoundCountdown += OnRoundCountdown;
     _roundManager.RoundStarted   += OnRoundStarted;
     _roundManager.RoundGameOver  += OnRoundGameOver;
     _scoreManager = SceneContext.Instance.ScoreManager;
 }
 public ParticlesManager()
 {
     _bounds                      = Enum.GetValues(typeof(Bound));
     _intRandom                   = new System.Random();
     _particlesPool               = new ObjectPool <ParticleController>();
     _roundSettings               = SceneContext.Instance.RoundSettings;
     _roundManager                = SceneContext.Instance.RoundManager;
     _roundManager.RoundStarted  += OnRoundStarted;
     _roundManager.RoundEnded    += OnRoundEndedOrGameOver;
     _roundManager.RoundGameOver += OnRoundEndedOrGameOver;
     _boundsManager               = SceneContext.Instance.BoundsManager;
     _updateManager               = SceneContext.Instance.UpdateManager;
     _updateManager.Add(this);
 }
Ejemplo n.º 7
0
        public RectangleController(RectangleView view)
        {
            _cursorManager    = SceneContext.Instance.CursorManager;
            _particlesManager = SceneContext.Instance.ParticlesManager;
            _roundManager     = SceneContext.Instance.RoundManager;

            var rectangleSettings = SceneContext.Instance.RectangleSettings;
            var particleSettings  = SceneContext.Instance.ParticleSettings;
            var transform         = view.transform;

            transform.localScale = new Vector3(
                rectangleSettings.Width,
                rectangleSettings.Height,
                particleSettings.MaxRadius + 1
                );
        }