Example #1
0
 public SerializableObject CreateObject(SerializableObject orig)
 {
     var tmpObject = new Object(orig.GetEntity().Model, orig.GetEntity().Position);
     tmpObject.Rotation = orig.GetEntity().Rotation;
     tmpObject.Position = orig.GetEntity().Position;
     var tmpObj = (SerializableObject)orig.Clone();
     tmpObj.SetEntity(tmpObject);
     CurrentMission.Objects.Add(tmpObj);
     return tmpObj;
 }
Example #2
0
 public SerializableObject CreateObject(Model model, Vector3 pos, Rotator rot)
 {
     var tmpObject = new Object(model, pos);
     tmpObject.Rotation = rot;
     tmpObject.Position = pos;
     var tmpObj = new SerializableObject();
     tmpObj.SetEntity(tmpObject);
     tmpObj.SpawnAfter = 0;
     tmpObj.RemoveAfter = 0;
     CurrentMission.Objects.Add(tmpObj);
     return tmpObj;
 }