Custom event classes for patched methods

Update to LeapCSharp 6.15.0
This commit is contained in:
SDraw 2024-04-26 23:52:25 +03:00
parent 4b879d53d5
commit 85925a7072
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
76 changed files with 3443 additions and 2187 deletions

View file

@ -81,6 +81,11 @@ namespace ml_bft
m_pose = new HumanPose();
m_lastValues = new float[40];
GameEvents.OnAvatarSetup.AddHandler(this.OnAvatarSetup);
GameEvents.OnAvatarClear.AddHandler(this.OnAvatarClear);
GameEvents.OnAvatarReuse.AddHandler(this.OnAvatarReuse);
GameEvents.OnIKSystemLateUpdate.AddHandler(this.OnIKSystemLateUpdate);
}
internal void Cleanup()
{
@ -90,6 +95,11 @@ namespace ml_bft
m_leftFingerOffsets.Clear();
m_rightFingerOffsets.Clear();
m_ready = false;
GameEvents.OnAvatarSetup.RemoveHandler(this.OnAvatarSetup);
GameEvents.OnAvatarClear.RemoveHandler(this.OnAvatarClear);
GameEvents.OnAvatarReuse.RemoveHandler(this.OnAvatarReuse);
GameEvents.OnIKSystemLateUpdate.RemoveHandler(this.OnIKSystemLateUpdate);
}
internal void OnAvatarSetup()
@ -173,7 +183,7 @@ namespace ml_bft
m_rightFingerOffsets.Clear();
}
internal void OnReinitializeAvatar()
internal void OnAvatarReuse()
{
OnAvatarClear();
OnAvatarSetup();