示例#1
0
        public static NarrativeObject GetObjectOR(Generator.Tags tags, out bool reused, HashSet <NarrativeObject> existingObjects = null)
        {
            if (existingObjects != null)
            {
                NarrativeObject obj = existingObjects.FirstOrDefault(o => (o._narrativeTag & tags) != 0);
                if (obj != null)
                {
                    reused = true;
                    return(obj);
                }
            }

            reused = false;
            return(_allObjects.FirstOrDefault(o => (o._narrativeTag & tags) != 0));
        }
示例#2
0
 //An object has to match any of the tags to pass the comparison
 public static IEnumerable <NarrativeObject> GetObjectsOR(Generator.Tags tags)
 {
     return(_allObjects.Where(obj => (obj._narrativeTag & tags) != 0));
 }