Exemple #1
0
 public void CallHandler()
 {
     if (player.position.y > transform.position.y + 0.4f)
     {
         playerJumper.Jump();
         enemyDestroyAnimator.Animate();
         scoreManager.AddScore(ENEMY_SCORE);
         enemySEPlayer.Play(GameEnum.ENEMY_SE.DEFEAT);
     }
     else
     {
         gameOverDisplayer.Show();
         gameModeManager.SetGameMode(GameEnum.GAME_MODE.GAMEOVER);
         playerEnemyHitAnimator.Animate();
         enemySEPlayer.Play(GameEnum.ENEMY_SE.MISS);
     }
 }
Exemple #2
0
    /// <summary>
    /// Jump to the next platform
    /// </summary>
    void Jump_()
    {
        // only jump if on ground
        if (_jumpScript.OnGround())
        {
            // move to next action
            _actions.RemoveAt(0);

            // move to next platform
            _jumpScript.Jump();

            MarshLandController.Instance.ClearAction(GetPlayerIndex());

            // can now fall in
            _leftStartPoint    = true;
            _alreadyFellInHere = false;
        }
    }