public static void RegisterLimb(InteractionLimb type, GameObject limb)
        {
            var typeIndex = LimbToInt(type);

            if (RegisteredLimbs[typeIndex] != null)
            {
                Debug.LogWarning(String.Format("Already registered limb '{0}'! Overwriting old value..", type.ToString()));
            }

            RegisteredLimbs[typeIndex] = limb;
        }
Exemple #2
0
        public static void RegisterLimb(InteractionLimb type, GameObject limb)
        {
            var typeIndex = LimbToInt(type);

            if (RegisteredLimbs[typeIndex] != null)
            {
                Debug.LogWarning(String.Format("Already registered limb '{0}'! Overwriting old value..", type.ToString()));
            }

            RegisteredLimbs[typeIndex] = limb;
        }
        public static Dictionary<InteractionLimb, GameObject> GetLimbs(InteractionLimb[] limbs)
        {
            var limbMap = new Dictionary<InteractionLimb, GameObject>();

            foreach (var limb in limbs)
            {
                limbMap.Add(limb, GetLimb(limb));
            }

            return limbMap;
        }
Exemple #4
0
        public static GameObject GetLimb(InteractionLimb type)
        {
            var typeIndex = LimbToInt(type);

            return(RegisteredLimbs[typeIndex]);
        }
Exemple #5
0
        public static void DeregisterLimb(InteractionLimb type)
        {
            var typeIndex = LimbToInt(type);

            RegisteredLimbs[typeIndex] = null;
        }
Exemple #6
0
 private static int LimbToInt(InteractionLimb limb)
 {
     // enums are usually just integers with names
     return((int)limb);
 }
 private static int LimbToInt(InteractionLimb limb)
 {
     // enums are usually just integers with names
     return (int)limb;
 }
 public static GameObject GetLimb(InteractionLimb type)
 {
     var typeIndex = LimbToInt(type);
     return RegisteredLimbs[typeIndex];
 }
 public static void DeregisterLimb(InteractionLimb type)
 {
     var typeIndex = LimbToInt(type);
     RegisteredLimbs[typeIndex] = null;
 }