viewers access
public static UnityEvent<PlayerController, JumpBehaviour> Player.PlayerManager.Events.OnJump
CyberPsychosis > Player > PlayerManager > Events > OnJump
Called when the player jumps, wall jumps or double jumps
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");
}
}