Exemplo n.º 1
0
        private bool IsRealese()
        {
            List <Collider> triggers = ObjectItem.GetTriggers();

            if (triggers != null && triggers.Count > 0)
            {
                foreach (Collider item in triggers)
                {
                    if (item.gameObject.GetComponent <Hi5_Glove_Collider_Finger>() != null &&
                        item.gameObject.GetComponent <Hi5_Glove_Collider_Finger>().mFinger != null &&
                        item.gameObject.GetComponent <Hi5_Glove_Collider_Finger>().mFinger.mHand != null)
                    {
                        if (handType == Hi5_Object_Clap_Type.ELeft)
                        {
                            if (item.gameObject.GetComponent <Hi5_Glove_Collider_Finger>().mFinger.mHand.m_IsLeftHand)
                            {
                                return(false);
                            }
                        }
                        else if (handType == Hi5_Object_Clap_Type.ERight)
                        {
                            if (!item.gameObject.GetComponent <Hi5_Glove_Collider_Finger>().mFinger.mHand.m_IsLeftHand)
                            {
                                return(false);
                            }
                        }
                    }
                    else if (item.gameObject.GetComponent <Hi5_Glove_Collider_Palm>() != null &&
                             item.gameObject.GetComponent <Hi5_Glove_Collider_Palm>().mHand != null)
                    {
                        if (handType == Hi5_Object_Clap_Type.ELeft)
                        {
                            if (item.gameObject.GetComponent <Hi5_Glove_Collider_Palm>().mHand.m_IsLeftHand)
                            {
                                return(false);
                            }
                        }
                        else if (handType == Hi5_Object_Clap_Type.ERight)
                        {
                            if (!item.gameObject.GetComponent <Hi5_Glove_Collider_Palm>().mHand.m_IsLeftHand)
                            {
                                return(false);
                            }
                        }
                    }
                }
            }
            return(true);
        }