private void OnTriggerEnter(Collider collide) { controller = collide.gameObject.GetComponent <RPGCharacterController>(); if (controller != null) { oldJumpHandler = controller.GetHandler("Jump"); controller.SetHandler("Jump", new SimpleActionHandler(() => { Debug.Log("Can't jump!"); controller.EndAction("Jump"); }, () => { })); } }