Minor cleanup

This commit is contained in:
SDraw 2023-12-25 02:02:45 +03:00
parent 6a671d0da6
commit 9e841cef1c
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
15 changed files with 142 additions and 171 deletions

View file

@ -13,8 +13,8 @@ namespace ml_lme
"leapmotion_hands.asset"
};
static Dictionary<string, AssetBundle> ms_loadedAssets = new Dictionary<string, AssetBundle>();
static Dictionary<string, GameObject> ms_loadedObjects = new Dictionary<string, GameObject>();
static readonly Dictionary<string, AssetBundle> ms_loadedAssets = new Dictionary<string, AssetBundle>();
static readonly Dictionary<string, GameObject> ms_loadedObjects = new Dictionary<string, GameObject>();
public static void Load()
{

View file

@ -283,7 +283,7 @@ namespace ml_lme
{
float l_strength = l_data.m_leftHand.m_grabStrength;
float l_interactValue = 0f;
float l_interactValue;
if(m_gripToGrab)
l_interactValue = Mathf.Clamp01(Mathf.InverseLerp(Mathf.Min(Settings.GripThreadhold, Settings.InteractThreadhold), Mathf.Max(Settings.GripThreadhold, Settings.InteractThreadhold), l_strength));
else
@ -311,7 +311,7 @@ namespace ml_lme
{
float l_strength = l_data.m_rightHand.m_grabStrength;
float l_interactValue = 0f;
float l_interactValue;
if(m_gripToGrab)
l_interactValue = Mathf.Clamp01(Mathf.InverseLerp(Mathf.Min(Settings.GripThreadhold, Settings.InteractThreadhold), Mathf.Max(Settings.GripThreadhold, Settings.InteractThreadhold), l_strength));
else

View file

@ -1,5 +1,4 @@
using ABI_RC.Core.Player;
using ABI_RC.Systems.IK.SubSystems;
using System.Collections;
using System.Reflection;
using UnityEngine;

View file

@ -1,9 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ml_lme
{

View file

@ -4,17 +4,14 @@ namespace ml_lme
{
class VisualHand
{
Transform m_root = null;
Transform m_wrist = null;
Transform[] m_fingers = null;
readonly Transform m_wrist = null;
readonly Transform[] m_fingers = null;
public VisualHand(Transform p_root, bool p_left)
{
m_root = p_root;
if(m_root != null)
if(p_root != null)
{
m_wrist = m_root.Find(p_left ? "LeftHand/Wrist" : "RightHand/Wrist");
m_wrist = p_root.Find(p_left ? "LeftHand/Wrist" : "RightHand/Wrist");
if(m_wrist != null)
{
m_fingers = new Transform[20];