Ejemplo n.º 1
0
        // Advanced getters/setters

        // Ensure object exists.
        public void ensureObjectExists(string ID, GameObject template)
        {
            if (!objects.ContainsKey(ID))
            {
                // Create and save object from template
                objects[ID] = new ObjectState_t(template);
            }
        }
Ejemplo n.º 2
0
 // Advanced getters/setters
 // Get Wrapper object, defaulting to a passed in template if it does not exist.
 public ObjectState_t getWrapperObject(string ID, GameObject template)
 {
     if (!objects.ContainsKey(ID))
     {
         // Create and save object from template
         objects[ID] = new ObjectState_t(template);
     }
     return(objects[ID]);
 }
Ejemplo n.º 3
0
 // Get Wrapper object, defaulting to a passed in template if it does not exist.
 public ObjectState_t getWrapperObject(string ID, string prefab_ID)
 {
     if (!objects.ContainsKey(ID))
     {
         // Create and save object from template
         GameObject template = Resources.Load(prefab_ID) as GameObject;
         objects[ID] = new ObjectState_t(template);
     }
     return(objects[ID]);
 }