Esempio n. 1
0
        private LDtkDrawerEntity GetDrawerForEntity(EntityDefinition[] defs, int i)
        {
            EntityDefinition   entityData = defs[i];
            SerializedProperty entityProp = ArrayProp.GetArrayElementAtIndex(i);
            LDtkDrawerEntity   drawer     = new LDtkDrawerEntity(entityData, entityProp, entityData.Identifier);

            return(drawer);
        }
Esempio n. 2
0
 private void AddSimpleList(EntityDefinition[] defs, List <LDtkContentDrawer <EntityDefinition> > drawers)
 {
     for (int i = 0; i < defs.Length; i++)
     {
         LDtkDrawerEntity drawer = GetDrawerForEntity(defs, i);
         drawers.Add(drawer);
     }
 }
Esempio n. 3
0
        protected override void GetDrawers(EntityDefinition[] defs, List <LDtkContentDrawer <EntityDefinition> > drawers)
        {
            for (int i = 0; i < defs.Length; i++)
            {
                EntityDefinition   entityData = defs[i];
                SerializedProperty entityObj  = ArrayProp.GetArrayElementAtIndex(i);

                LDtkDrawerEntity drawer = new LDtkDrawerEntity(entityData, entityObj, entityData.Identifier);

                drawers.Add(drawer);
            }
        }
Esempio n. 4
0
        private void AddGroup(EntityDefinition[] defs, List <LDtkContentDrawer <EntityDefinition> > drawers, string tag, TagBouncer bouncer)
        {
            List <LDtkDrawerEntity> groupDrawers = new List <LDtkDrawerEntity>();

            for (int i = 0; i < defs.Length; i++)
            {
                if (bouncer.Invoke(defs[i].Tags))
                {
                    continue;
                }

                LDtkDrawerEntity drawer = GetDrawerForEntity(defs, i);
                groupDrawers.Add(drawer);
            }

            LDtkDrawerEntityGroup group = new LDtkDrawerEntityGroup(null, ArrayProp, tag, groupDrawers);

            drawers.Add(group);
        }