OnJump

public static UnityEvent<PlayerController, JumpBehaviour> Player.PlayerManager.Events.OnJump

CyberPsychosis    >    Player    >    PlayerManager    >    Events    >    OnJump

Summary

Called when the player jumps, wall jumps or double jumps

Examples

using UnityEngine;
using Player;

public class JumpSoundPlayer : MonoBehaviour
{
    void Start()
    {
        PlayerManager.Events.OnDash.AddListener(OnJump);
    }

    void OnJump(PlayerController player, JumpBehaviour jumpBehaviour)
    {
        if(jumpBehaviour is WallJumpBehaviour)
            SoundManager.PlayOneShot("PlayerWallJump");
        else
            SoundManager.PlayOneShot("PlayerJump");
    }
}