private void OnEnable() { _onPlayerAttackBegin.Subscribe(SlowDownAnimation); _onPlayerAttackEnd.Subscribe(FasterAnimation); _onWrongTarget.Subscribe(ScaleHead); _onWrongTarget.Subscribe(CheckGameOver); _onGameOver.Subscribe(GameOver); _onLevelEnd.Subscribe(LevelEnd); _onGameStart.Subscribe(Run); }
protected override void OnEnable() { base.OnEnable(); _onLevelSpawn.Subscribe(SpawnSteps); _onLevelEnd.Subscribe(RespawnSteps); _onGameStart.Subscribe(StartGame); }
private void Start() { _onPlayerAttackBegin.Subscribe(SlowDown); _onPlayerAttackEnd.Subscribe(GoFaster); _onLevelEnd.Subscribe(LevelEnd); _onGameStart.Subscribe(GameStart); enabled = false; }
protected override void OnEnable() { base.OnEnable(); _playerMeshes = new List <int>(); _onQuitEvent.Subscribe(SaveMeshes); _onPlayerMaterialReward.Subscribe(AddMeshToPlayer); _currentMesh.onValueChanged += SaveMeshes; _currentMesh.onValueChanged += ResetStepMaterial; }
protected override void OnEnable() { base.OnEnable(); _currentStep.Value = 0; _totalSteps.Value = 10; _currentScore.onValueChanged += UpdateCurrentScore; _bestScore.onValueChanged += UpdateMaxScore; _currentLevel.onValueChanged += UpdateCurrentLevel; _nextLevel.onValueChanged += UpdateNextLevel; _currentStep.onValueChanged += UpdateStep; _totalSteps.onValueChanged += UpdateStep; _onGameOverEvent.Subscribe(ShowLevelEnd); _onNewPlayerItemReward.Subscribe(ShowRewardPopup); }
private void OnEnable() { _onLevelEnd.Subscribe(EnableBalloonDestroy); }
private void OnEnable() { _onWrongTarget.Subscribe(UpdateValue); _slider.value = 0; }
private void OnEnable() { _customInputSystem.onPointerDownEvent += TargetEnemy; _onSlapButton.Subscribe(Attack); }
protected override void OnEnable() { base.OnEnable(); _onGameOver.Subscribe(GetReward); _onQuit.Subscribe(SaveScore); }
private void OnEnable() { _onLevelEnd.Subscribe(LevelEnd); }
private void OnEnable() { _onRestart.Subscribe(Restart); }
private void Start() { _onSlapButton.Subscribe(OnPressed); _onPlayerAtackBegin.Subscribe(OnPlayerAttackBegin); gameObject.SetActive(false); }
private void OnEnable() { _levelProgress.onValueChanged += UpdateLevelProgressBar; _onLevelSuccess.Subscribe(Hide); }
protected override void OnEnable() { base.OnEnable(); _onRestart.Subscribe(Restart); }
private void OnEnable() { _onPlayerAttackBegin.Subscribe(SlowDownAnimation); _onPlayerAttackEnd.Subscribe(FasterAnimation); }