public ScoreManager() { _roundManager = SceneContext.Instance.RoundManager; _roundManager.RoundCountdown += OnRoundCountdown; _particlesManager = SceneContext.Instance.ParticlesManager; _particlesManager.ParticleDestroyed += OnParticleDestroyed; }
public BoundsManager() { _camera = SceneContext.Instance.Camera; _particleSettings = SceneContext.Instance.ParticleSettings; _roundManager = SceneContext.Instance.RoundManager; _roundManager.RoundCountdown += RecalculateBounds; RecalculateBounds(); }
private void Awake() { _updateManager = new UpdateManager(); _roundManager = new RoundManager(); _boundsManager = new BoundsManager(); _cursorManager = new CursorManager(); _particlesManager = new ParticlesManager(); _scoreManager = new ScoreManager(); }
public CursorManager() { _camera = SceneContext.Instance.Camera; _updateManager = SceneContext.Instance.UpdateManager; _updateManager.Add(this); _roundManager = SceneContext.Instance.RoundManager; _roundManager.RoundCountdown += OnRoundCountdown; _roundManager.RoundGameOver += OnRoundGameOver; }
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); }
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 ); }