|
|
@ -157,7 +157,6 @@ public class YeetController : InputBehaviour |
|
|
|
|
|
|
|
private void OnTriggerEnter(Collider collider) |
|
|
|
{ |
|
|
|
Debug.Log("PlayerInputController.OnTriggerEnter: arrived"); |
|
|
|
m_child = collider.gameObject; |
|
|
|
} |
|
|
|
|
|
|
@ -169,6 +168,8 @@ public class YeetController : InputBehaviour |
|
|
|
private void OnYeet(InputAction.CallbackContext args) |
|
|
|
{ |
|
|
|
|
|
|
|
Debug.Log($"Player Yeeting: {args.phase}"); |
|
|
|
|
|
|
|
parent = m_body; |
|
|
|
switch (yeetState) |
|
|
|
{ |
|
|
@ -182,7 +183,7 @@ public class YeetController : InputBehaviour |
|
|
|
Yeet(); |
|
|
|
break; |
|
|
|
case YeetController.YeetState.Held: |
|
|
|
/*if (args.phase == InputActionPhase.Started)*/ |
|
|
|
if (args.phase == InputActionPhase.Started) |
|
|
|
Preyeet(); |
|
|
|
// Yeet baby
|
|
|
|
|
|
|
@ -195,13 +196,13 @@ public class YeetController : InputBehaviour |
|
|
|
|
|
|
|
public override void RegisterInput(PlayerInput playerInput) |
|
|
|
{ |
|
|
|
playerInput.currentActionMap.FindAction("Yeet").performed += OnYeet; |
|
|
|
playerInput.currentActionMap.FindAction("Yeet").canceled += OnYeet; |
|
|
|
playerInput.currentActionMap.FindAction("Yeet").started += OnYeet; |
|
|
|
} |
|
|
|
|
|
|
|
public override void UnregisterInput(PlayerInput playerInput) |
|
|
|
{ |
|
|
|
playerInput.currentActionMap.FindAction("Yeet").performed -= OnYeet; |
|
|
|
playerInput.currentActionMap.FindAction("Yeet").canceled -= OnYeet; |
|
|
|
playerInput.currentActionMap.FindAction("Yeet").started -= OnYeet; |
|
|
|
} |
|
|
|
} |