// function for allocating a intermediate object public bool AllocateInterIntObj(int chooseObj, GameObject obj, List <string> nextType, string thumbnail) { InteractiveObject intObj = new InterIntObj(null, obj, nextType, thumbnail); interactiveObjects.Add(intObj); nonShownInteractiveObjects.Add((InterIntObj)intObj); relationList.Add( new KeyValuePair <InteractiveObject, InteractiveObject> ( intObj, locks [chooseObj])); keys.Add(intObj); lastIntObj = (InterIntObj)intObj; return(true); }
public InteractiveObjectAllocator(System.Random prng) { relationList = new List <KeyValuePair <InteractiveObject, InteractiveObject> > (); interactiveObjects = new List <InteractiveObject> (); nonShownInteractiveObjects = new List <InterIntObj> (); locations = new List <Location> (); lockLocations = new List <LockLocation> (); lastIntObj = null; priorityList = new List <string> (); this.prng = prng; this.doors = new List <Door> (); this.locks = new List <Lock> (); this.keys = new List <InteractiveObject> (); this.tempKeys = new List <InteractiveObject> (); this.tempSplitKeys = new List <KeyValuePair <InteractiveObject, int> > (); roomOpenPosition = new List <int> (); // record room open moment with key }