示例#1
0
    private void OnEnable()
    {
        _onPlayerAttackBegin.Subscribe(SlowDownAnimation);
        _onPlayerAttackEnd.Subscribe(FasterAnimation);
        _onWrongTarget.Subscribe(ScaleHead);
        _onWrongTarget.Subscribe(CheckGameOver);
        _onGameOver.Subscribe(GameOver);

        _onLevelEnd.Subscribe(LevelEnd);
        _onGameStart.Subscribe(Run);
    }
示例#2
0
 protected override void OnEnable()
 {
     base.OnEnable();
     _onLevelSpawn.Subscribe(SpawnSteps);
     _onLevelEnd.Subscribe(RespawnSteps);
     _onGameStart.Subscribe(StartGame);
 }
示例#3
0
 private void Start()
 {
     _onPlayerAttackBegin.Subscribe(SlowDown);
     _onPlayerAttackEnd.Subscribe(GoFaster);
     _onLevelEnd.Subscribe(LevelEnd);
     _onGameStart.Subscribe(GameStart);
     enabled = false;
 }
示例#4
0
 protected override void OnEnable()
 {
     base.OnEnable();
     _playerMeshes = new List <int>();
     _onQuitEvent.Subscribe(SaveMeshes);
     _onPlayerMaterialReward.Subscribe(AddMeshToPlayer);
     _currentMesh.onValueChanged += SaveMeshes;
     _currentMesh.onValueChanged += ResetStepMaterial;
 }
示例#5
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);
    }
示例#6
0
 private void OnEnable()
 {
     _onLevelEnd.Subscribe(EnableBalloonDestroy);
 }
示例#7
0
 private void OnEnable()
 {
     _onWrongTarget.Subscribe(UpdateValue);
     _slider.value = 0;
 }
示例#8
0
 private void OnEnable()
 {
     _customInputSystem.onPointerDownEvent += TargetEnemy;
     _onSlapButton.Subscribe(Attack);
 }
示例#9
0
 protected override void OnEnable()
 {
     base.OnEnable();
     _onGameOver.Subscribe(GetReward);
     _onQuit.Subscribe(SaveScore);
 }
示例#10
0
 private void OnEnable()
 {
     _onLevelEnd.Subscribe(LevelEnd);
 }
示例#11
0
 private void OnEnable()
 {
     _onRestart.Subscribe(Restart);
 }
示例#12
0
 private void Start()
 {
     _onSlapButton.Subscribe(OnPressed);
     _onPlayerAtackBegin.Subscribe(OnPlayerAttackBegin);
     gameObject.SetActive(false);
 }
示例#13
0
 private void OnEnable()
 {
     _levelProgress.onValueChanged += UpdateLevelProgressBar;
     _onLevelSuccess.Subscribe(Hide);
 }
示例#14
0
 protected override void OnEnable()
 {
     base.OnEnable();
     _onRestart.Subscribe(Restart);
 }
示例#15
0
文件: Enemy.cs 项目: marinvlad/SLAPit
 private void OnEnable()
 {
     _onPlayerAttackBegin.Subscribe(SlowDownAnimation);
     _onPlayerAttackEnd.Subscribe(FasterAnimation);
 }