示例#1
0
 void InitLocation(string scene, string name, Vector3 pos, float rot, LocationType type, Vector3 size, List <string> containedLocations)
 {
     this.scene = scene;
     this.name  = name;
     this.pos   = pos;
     this.type  = (int)type;
     this.size  = size;
     this.containedLocations = containedLocations;
     this.rot = rot;
 }
示例#2
0
        public SceneObjectState(Component c)
        {
            // get all saveable information from attached scripts,
            // maybe a scene item has an inventory or otehr ocmponents thhat need to save their states
            ISaveableAttachment[] saveables = c.GetComponents <ISaveableAttachment>();

            attachmentStates = new AttachmentState[saveables.Length];
            for (int x = 0; x < saveables.Length; x++)
            {
                attachmentStates[x] = new AttachmentState(saveables[x].AttachmentType(), saveables[x].OnSaved());
            }

            this.position = c.transform.position;
            this.rotation = c.transform.rotation;
        }