Updated function overriding

This commit is contained in:
Pascal Serrarens 2023-02-24 15:40:16 +01:00
parent 4d7ab052a2
commit 77c9e37aef

View File

@ -41,7 +41,7 @@ namespace Passer.Humanoid {
inputModule.EnableTouchInput(humanoid, isLeft, 0); inputModule.EnableTouchInput(humanoid, isLeft, 0);
} }
public HandSocket CreateGrabSocket() { public virtual HandSocket CreateGrabSocket() {
if (hand.bone.transform == null) if (hand.bone.transform == null)
return null; return null;
@ -816,7 +816,7 @@ namespace Passer.Humanoid {
} }
protected void LetGoRigidbodyWithoutHandle() { protected virtual void LetGoRigidbodyWithoutHandle() {
Rigidbody objRigidbody = RigidbodyDisabled.UnparentRigidbody(handPalm, grabbedObject.transform); Rigidbody objRigidbody = RigidbodyDisabled.UnparentRigidbody(handPalm, grabbedObject.transform);
if (objRigidbody != null && !objRigidbody.isKinematic) { if (objRigidbody != null && !objRigidbody.isKinematic) {
if (handRigidbody != null) { if (handRigidbody != null) {
@ -829,11 +829,11 @@ namespace Passer.Humanoid {
LetGoStaticWithoutHandle(); LetGoStaticWithoutHandle();
} }
protected void LetGoStaticWithoutHandle() { protected virtual void LetGoStaticWithoutHandle() {
grabSocket.ReleaseStaticJoint(); grabSocket.ReleaseStaticJoint();
} }
protected void LetGoRigidbody(Rigidbody grabbedRigidbody) { protected virtual void LetGoRigidbody(Rigidbody grabbedRigidbody) {
DebugLog("LetGoRigidbody"); DebugLog("LetGoRigidbody");
if (grabbedRigidbody != null) { if (grabbedRigidbody != null) {
@ -856,7 +856,7 @@ namespace Passer.Humanoid {
this.grabbedRigidbody = false; this.grabbedRigidbody = false;
} }
protected void LetGoHandle(Handle handle) { protected virtual void LetGoHandle(Handle handle) {
DebugLog("LetGoHandle " + handle); DebugLog("LetGoHandle " + handle);
if (Application.isPlaying) { if (Application.isPlaying) {
if (grabbedHandle != null) { if (grabbedHandle != null) {