public void Activate() { _isActive = true; _time = Time.time; ApplyStartSpeed(GameController.Instance.GameSession.Level); SignalsManager.Register(_levelSignal.Name, OnLevelChange); }
public override void OnEnter() { base.OnEnter(); UpdateLevel(GameController.Instance.GameSession.Level, GameController.Instance.GameSession.Score); SignalsManager.Register(_levelSignal.Name, OnLevelChange); SignalsManager.Register(_scoreSignal.Name, OnScoreChanged); }
protected override void Awake() { base.Awake(); _networkManager = GetComponent <NetworkManager>(); _networkManager.StartMatch(OnMatchCreate, OnMatchList); SignalsManager.Register(_hitTopBoundSignal.Name, OnHitBoundsAction); SignalsManager.Register(_hitBottomBoundSignal.Name, OnHitBoundsAction); }
protected override void Awake() { base.Awake(); _topRacket = Instantiate(_racketPrefab, RacketRoot); _topRacket.Setup(RacketType.Top); _bottomRacket = Instantiate(_racketPrefab, RacketRoot); _bottomRacket.Setup(RacketType.Bottom); SignalsManager.Register(_hitRacketSignal.Name, OnHitRacketAction); SignalsManager.Register(_hitTopBoundSignal.Name, OnHitBoundsAction); SignalsManager.Register(_hitBottomBoundSignal.Name, OnHitBoundsAction); }
public override void OnEnter() { base.OnEnter(); _livesViewController.Subscribe(); _livesViewController.UpdateLives(GameController.Instance.GameSession.Lives); _level.text = string.Format(LocalizationManager.GetString("Level"), GameController.Instance.GameSession.Level); _score.text = GameController.Instance.GameSession.Score.ToString(); UpdateLevelProgress(GameController.Instance.GameSession.Score); SignalsManager.Register(_levelSignal.Name, OnLevelChange); SignalsManager.Register(_scoreSignal.Name, OnScoreChanged); }
public override void OnEnter() { base.OnEnter(); _bestScoreShown = false; _tutorial.alpha = 0f; UpdateScoreValue(0); SignalsManager.Register("CurrentScoreChanged", UpdateScoreValue); _showTutorialTask = new WaitTask(this, GameController.Instance.Settings.ActivationTime, () => { if (InputEventProvider.Instance.PointersCount == 0) { ShowTutorial(); } }); _showTutorialTask.Start(); InputEventProvider.Instance.PointerDown += OnPointerDown; InputEventProvider.Instance.PointerUp += OnPointerUp; }
protected override void Register() { SignalsManager.Register(Signal.Name, Action.Invoke); }
public override void Activate() { UpdateColor(GameController.Instance.GameSession.Color); SignalsManager.Register(_colorSignal.Name, UpdateColor); }
protected override void Register() { SignalsManager.Register(Signal.Name, (UnityAction <float>)Action.Invoke); }
private void OnEnable() { SignalsManager.Register(Signal.Name, Action.Invoke); }
private void Awake() { _activeRows = new LinkedList <Row>(); SignalsManager.Register(_updateSignal.Name, UpdateGrid); }
public void Subscribe() { SignalsManager.Register(_livesSignal.Name, UpdateLives); SignalsManager.Register(_colorSignal.Name, ApplyColor); }