|
|
@ -34,6 +34,7 @@ public class YeetController : InputBehaviour |
|
|
|
|
|
|
|
private LineRenderer m_lineRenderer; |
|
|
|
private AudioSource m_audioSource; |
|
|
|
private Transform m_OldChildParent; |
|
|
|
|
|
|
|
private Vector3 preyeetPosition; |
|
|
|
|
|
|
@ -49,6 +50,7 @@ public class YeetController : InputBehaviour |
|
|
|
m_audioSource.clip = childClips[Random.Range(0, childClips.Length)]; |
|
|
|
|
|
|
|
_child = child; |
|
|
|
m_OldChildParent = _child.transform.parent; |
|
|
|
_child.transform.parent = parent.transform; |
|
|
|
_child.GetComponent<YeetHandle>().held = true; |
|
|
|
_child.GetComponent<YeetHandle>().lastHeld = parent; |
|
|
@ -78,7 +80,7 @@ public class YeetController : InputBehaviour |
|
|
|
m_YeetAnimator.SetBool("Yeet", false); |
|
|
|
m_YeetAnimator.SetBool("Carry", false); |
|
|
|
|
|
|
|
_child.transform.parent = null; |
|
|
|
_child.transform.parent = m_OldChildParent; |
|
|
|
_child.transform.rotation = parent.transform.rotation; |
|
|
|
_child.GetComponent<YeetHandle>().held = false; |
|
|
|
|
|
|
|