Example #1
0
        public static HitBoxGroup FindHitBoxGroup(string groupName, Transform modelTransform)
        {
            if (!modelTransform)
            {
                return(null);
            }
            HitBoxGroup        result = null;
            List <HitBoxGroup> gameObjectComponents = GetComponentsCache <HitBoxGroup> .GetGameObjectComponents(modelTransform.gameObject);

            int i     = 0;
            int count = gameObjectComponents.Count;

            while (i < count)
            {
                if (gameObjectComponents[i].groupName == groupName)
                {
                    result = gameObjectComponents[i];
                    break;
                }
                i++;
            }
            GetComponentsCache <HitBoxGroup> .ReturnBuffer(gameObjectComponents);

            return(result);
        }
Example #2
0
        // Token: 0x0600239C RID: 9116 RVA: 0x0009B74C File Offset: 0x0009994C
        private void Rebuild()
        {
            this.DestroyRows();
            CharacterBody bodyPrefabBodyComponent = BodyCatalog.GetBodyPrefabBodyComponent(this.currentDisplayData.bodyIndex);

            if (bodyPrefabBodyComponent)
            {
                List <GenericSkill> gameObjectComponents = GetComponentsCache <GenericSkill> .GetGameObjectComponents(bodyPrefabBodyComponent.gameObject);

                int i     = 0;
                int count = gameObjectComponents.Count;
                while (i < count)
                {
                    GenericSkill skillSlot = gameObjectComponents[i];
                    this.rows.Add(LoadoutPanelController.Row.FromSkillSlot(this, this.currentDisplayData.bodyIndex, i, skillSlot));
                    i++;
                }
                int num = BodyCatalog.GetBodySkins(this.currentDisplayData.bodyIndex).Length;
                if (true)
                {
                    this.rows.Add(LoadoutPanelController.Row.FromSkin(this, this.currentDisplayData.bodyIndex));
                }
            }
        }