Ejemplo n.º 1
0
 protected override void OnEnable()
 {
     base.OnEnable();
     _playerMeshes = new List <int>();
     _onQuitEvent.Subscribe(SaveMeshes);
     _onPlayerMaterialReward.Subscribe(AddMeshToPlayer);
     _currentMesh.onValueChanged += SaveMeshes;
     _currentMesh.onValueChanged += ResetStepMaterial;
 }
Ejemplo n.º 2
0
    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);
    }
Ejemplo n.º 3
0
 private void OnEnable()
 {
     _onEnemyArrest.Subscribe(ArrestEnemies);
 }
Ejemplo n.º 4
0
 private void OnEnable()
 {
     _onStepDestroyEvent.Subscribe(OnStepDestroy);
 }
Ejemplo n.º 5
0
 private void OnEnable()
 {
     _onPlatformEnd.Subscribe(MoveToNextPlatform);
 }