Ejemplo n.º 1
0
 private void collideSenseBomb()
 {
     for (int i = 0; i < equipments.Length; i++)
     {
         if (null != equipments[i])
         {
             SenseBomb component = equipments[i].GetComponent <SenseBomb>();
             if (component != null)
             {
                 component.collideTest();
             }
             Gun component2 = equipments[i].GetComponent <Gun>();
             if (component2 != null)
             {
                 component2.collisionTest1st();
                 component2.collsionTest2nd();
             }
             XmasBomb component3 = equipments[i].GetComponent <XmasBomb>();
             if (!(component3 != null))
             {
             }
         }
     }
 }
Ejemplo n.º 2
0
    public void SetShootEnermyEffect()
    {
        Aim componentInChildren = GetComponentInChildren <Aim>();

        if (null != componentInChildren)
        {
            componentInChildren.SetShootEnermyEffect();
        }
        else
        {
            MeleeWeapon componentInChildren2 = rightHand.GetComponentInChildren <MeleeWeapon>();
            if (componentInChildren2 != null)
            {
                componentInChildren2.SetShootEnermyEffect();
            }
            else
            {
                Grenade componentInChildren3 = rightHand.GetComponentInChildren <Grenade>();
                if (componentInChildren3 != null)
                {
                    componentInChildren3.SetShootEnermyEffect();
                }
                else
                {
                    FlashBang componentInChildren4 = rightHand.GetComponentInChildren <FlashBang>();
                    if (componentInChildren4 != null)
                    {
                        componentInChildren4.SetShootEnermyEffect();
                    }
                    else
                    {
                        SmokeGrenade componentInChildren5 = rightHand.GetComponentInChildren <SmokeGrenade>();
                        if (componentInChildren5 != null)
                        {
                            componentInChildren5.SetShootEnermyEffect();
                        }
                        else
                        {
                            SenseBomb componentInChildren6 = rightHand.GetComponentInChildren <SenseBomb>();
                            if (componentInChildren6 != null)
                            {
                                componentInChildren6.SetShootEnermyEffect();
                            }
                            else
                            {
                                XmasBomb componentInChildren7 = rightHand.GetComponentInChildren <XmasBomb>();
                                if (componentInChildren7 != null)
                                {
                                    componentInChildren7.SetShootEnermyEffect();
                                }
                                else
                                {
                                    PoisonBomb componentInChildren8 = rightHand.GetComponentInChildren <PoisonBomb>();
                                    if (componentInChildren8 != null)
                                    {
                                        componentInChildren8.SetShootEnermyEffect();
                                    }
                                    else
                                    {
                                        GetComponent <LocalController>().SetShootEnermyEffect();
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }