public void RemoveProvider(AComponentData provider) { providers.Remove(provider); if (provider is LeftFootData) { leftFoot = null; } else if (provider is RightFootData) { rightFoot = null; } else if (provider is HipData) { hipData = null; } else if (provider is LeftHandData) { leftHand = null; } else if (provider is RightHandData) { rightHand = null; } else if (provider is HeadData) { headData = null; } }
public void AddProvider(AComponentData provider) { providers.Add(provider); if (provider is LeftFootData) { leftFoot = (LeftFootData)provider; } else if (provider is RightFootData) { rightFoot = (RightFootData)provider; } else if (provider is HipData) { hipData = (HipData)provider; } else if (provider is LeftHandData) { leftHand = (LeftHandData)provider; } else if (provider is RightHandData) { rightHand = (RightHandData)provider; } else if (provider is HeadData) { headData = (HeadData)provider; } }
private void HandleHands(AComponentData hand) { if (hand == leftHand) { leftHandPosition = hand.Position(); leftHandRotation = hand.Rotation(); } else { rightHandPosition = hand.Position(); // rightHand.Position(); rightHandRotation = hand.Rotation(); } }
private void HandleFeet(AComponentData foot) { if (foot == leftFoot) { leftFootPosition = foot.Position(); leftFootRotation = foot.Rotation(); } else { rightFootPosition = foot.Position(); rightFootRotation = foot.Rotation(); } }
private void HandleHead(AComponentData head) { headPosition = head.Position(); headRotation = head.Rotation(); }
private void HandleHip(AComponentData hip) { hipPosition = hip.Position(); hipRotation = hip.Rotation(); }